From b7079e538437aacf079d82c21504e44d7396926a Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Tue, 15 Oct 2019 18:50:46 +0900 Subject: [PATCH] Try to avoid random failure https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20191015T070011Z.fail.html.gz ``` 1) Failure: TestProcess#test_kill_at_spawn_failure [/home/chkbuild/chkbuild/tmp/build/20191015T070011Z/ruby/test/ruby/test_process.rb:2276]: [ruby-core:69304] [Bug #11166]. <#> expected but was . `` --- test/ruby/test_process.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index d1814a81bb..72120e4508 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -2269,7 +2269,9 @@ EOS th = nil x = with_tmpchdir {|d| prog = "#{d}/notexist" - th = Thread.start {system(prog);sleep} + q = Thread::Queue.new + th = Thread.start {system(prog);q.push(nil);sleep} + q.pop th.kill th.join(0.1) }