Skip to content

Commit 31a3346

Browse files
committed
nxt
1 parent 60b4015 commit 31a3346

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

Diff for: spec/inputs/file_read_spec.rb

+13-3
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,22 @@
353353
def wait_for_start_processing(run_thread, timeout: 1.0)
354354
begin
355355
Timeout.timeout(timeout) do
356-
sleep(0.01) while run_thread.status != 'sleep'
357-
sleep(timeout) unless plugin.queue
356+
# sleep(0.01) while run_thread.status != 'sleep'
357+
while run_thread.status != 'sleep'
358+
puts "not sleep"
359+
sleep(0.01)
360+
end
361+
# sleep(0.1) while !plugin.queue
362+
while !plugin.queue
363+
sleep(0.1)
364+
puts "no queue"
365+
end
358366
end
359-
rescue Timeout::Error
367+
rescue Timeout::Error => e
368+
puts "plugin timed out #{e}"
360369
raise "plugin did not start processing (timeout: #{timeout})" unless plugin.queue
361370
else
371+
puts "plugin did not time out"
362372
raise "plugin did not start processing" unless plugin.queue
363373
end
364374
end

0 commit comments

Comments
 (0)