From 4aa2e948cef829bc0178d74f414ca66fadf61896 Mon Sep 17 00:00:00 2001 From: Yuta Iwama Date: Tue, 24 Mar 2020 11:36:31 +0900 Subject: [PATCH] In some env, it can take some time to output lines Signed-off-by: Yuta Iwama --- test/plugin_helper/test_child_process.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/plugin_helper/test_child_process.rb b/test/plugin_helper/test_child_process.rb index 498277d06b..186ef01e46 100644 --- a/test/plugin_helper/test_child_process.rb +++ b/test/plugin_helper/test_child_process.rb @@ -286,9 +286,11 @@ def configure(conf) assert_equal [], @d.log.out.logs @d.stop # nothing occurs - sleep TEST_WAIT_INTERVAL_FOR_LOOP - lines1 = ary.size - assert{ lines1 > 1 } + lines1 = nil + waiting(TEST_WAIT_INTERVAL_FOR_LOOP * 3) do + lines1 = ary.size + lines1 > 1 + end pid = @d._child_process_processes.keys.first # default value 10 is too long for test