test/plugin/test_out_flowcounter.rb in fluent-plugin-flowcounter-0.1.4 vs test/plugin/test_out_flowcounter.rb in fluent-plugin-flowcounter-0.1.5
- old
+ new
@@ -231,8 +231,9 @@
emits = d3.emits
assert_equal 1, emits.length
data = emits[0]
assert_equal 'flowcount', data[0] # tag
assert_equal 60*5, data[2]['count']
- assert_equal 60*5*20, data[2]['bytes']
+ msgpack_size = {'f1' => 'abcde', 'f2' => 'vwxyz', 'f3' => '0123456789'}.to_msgpack.bytesize * 5 * 60
+ assert_equal msgpack_size, data[2]['bytes']
end
end