test/plugin/test_out_map.rb in fluent-plugin-map-0.0.3.1 vs test/plugin/test_out_map.rb in fluent-plugin-map-0.0.4
- old
+ new
@@ -171,6 +171,24 @@
record record
multi true
], tag
}
end
+
+ def test_timeout
+ tag = 'tag'
+ time = Time.local(2012, 10, 10, 10, 10, 10)
+ record = {'code' => '300'}
+
+ d1 = create_driver %[
+ key "newtag"
+ time sleep 10
+ record record
+ timeout 1s
+ ], tag
+ d1.run do
+ d1.emit(record, time)
+ end
+ emits = d1.emits
+ assert_equal 0, emits.length
+ end
end