From 7a9828dd751e74aafea23380a90e26f5ff730b89 Mon Sep 17 00:00:00 2001 From: Yuta Iwama Date: Tue, 10 Mar 2020 12:44:01 +0900 Subject: [PATCH] wait num_events since expect_emits number is not 1, num_events Signed-off-by: Yuta Iwama --- test/plugin/test_in_tail.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plugin/test_in_tail.rb b/test/plugin/test_in_tail.rb index 06454477e3..fdac12bde7 100644 --- a/test/plugin/test_in_tail.rb +++ b/test/plugin/test_in_tail.rb @@ -226,7 +226,7 @@ def test_emit_with_read_lines_limit(data) d = create_driver(config) msg = 'test' * 2000 # in_tail reads 8192 bytes at once. - d.run(expect_emits: 1) do + d.run(expect_emits: num_events, timeout: 1) do File.open("#{TMP_DIR}/tail.txt", "ab") {|f| f.puts msg f.puts msg