diff --git a/test/plugin/test_output_as_buffered_retries.rb b/test/plugin/test_output_as_buffered_retries.rb index 27ad169d1c..4ac258e42b 100644 --- a/test/plugin/test_output_as_buffered_retries.rb +++ b/test/plugin/test_output_as_buffered_retries.rb @@ -895,6 +895,10 @@ def get_log_time(msg, logs) @i.flush_thread_wakeup waiting(4){ Thread.pass until @i.write_count > 0 } + waiting(4) do + state = @i.instance_variable_get(:@output_flush_threads).first + state.thread.status == 'sleep' + end assert(@i.write_count > 0) assert(@i.num_errors > 0) @@ -903,6 +907,10 @@ def get_log_time(msg, logs) Timecop.freeze( now ) @i.flush_thread_wakeup waiting(4){ Thread.pass until @i.write_count > 1 } + waiting(4) do + state = @i.instance_variable_get(:@output_flush_threads).first + state.thread.status == 'sleep' + end assert(@i.write_count > 1) assert(@i.num_errors > 1)