diff options
author | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2019-10-15 18:50:46 +0900 |
---|---|---|
committer | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2019-10-15 18:53:33 +0900 |
commit | b7079e538437aacf079d82c21504e44d7396926a (patch) | |
tree | 90565936a4173c102ce51bdc47ba55203a657c99 /test | |
parent | c800967acd35a763a6f09fe2b2e29870f064c22e (diff) | |
download | ruby-b7079e538437aacf079d82c21504e44d7396926a.tar.gz |
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>.
``
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_process.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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) } |