1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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].
<#<Thread:0x000009f60a7cac40@/home/chkbuild/chkbuild/tmp/build/20191015T070011Z/ruby/test/ruby/test_process.rb:2272 dead>> expected but was
<nil>.
``
This commit is contained in:
Kazuhiro NISHIYAMA 2019-10-15 18:50:46 +09:00
parent c800967acd
commit b7079e5384
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -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)
}