Skip to content

Commit

Permalink
test_out_exec_filter: add a sleep to ensure the stream is emitted
Browse files Browse the repository at this point in the history
Signed-off-by: Shizuo Fujita <[email protected]>
  • Loading branch information
Watson1978 committed Jan 5, 2025
1 parent 6d4e0d0 commit d39f3c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/plugin/test_out_exec_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ def create_driver(conf)
d.run(default_tag: 'test', expect_emits: 1, timeout: 10, start: false, shutdown: false){ d.feed(time, {"k1" => 1}) }
d.run(default_tag: 'test', expect_emits: 1, timeout: 10, start: false, shutdown: false){ d.feed(time, {"k1" => 2}) }
d.run(default_tag: 'test', expect_emits: 1, timeout: 10, start: false, shutdown: false){ d.feed(time, {"k1" => 3}) }
waiting(5) { sleep 0.1 until d.emit_count == 4 }

assert_equal "2011-01-02 13:14:15\ttest\t0\n", d.formatted[0]
assert_equal "2011-01-02 13:14:15\ttest\t1\n", d.formatted[1]
Expand Down

0 comments on commit d39f3c7

Please sign in to comment.