mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
avoid thread switching.
The test may fail if thread switches to d or e before assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cc19bcf11f
commit
f46ffca1c7
1 changed files with 7 additions and 2 deletions
|
@ -439,9 +439,14 @@ class TestThread < Test::Unit::TestCase
|
||||||
assert(c.stop?)
|
assert(c.stop?)
|
||||||
|
|
||||||
d.kill
|
d.kill
|
||||||
assert_equal(["aborting", false], [d.status, d.stop?])
|
# to avoid thread switching...
|
||||||
|
ds1 = d.status
|
||||||
|
ds2 = d.stop?
|
||||||
|
es1 = e.status
|
||||||
|
es2 = e.stop?
|
||||||
|
assert_equal(["aborting", false], [ds1, ds2])
|
||||||
|
|
||||||
assert_equal(["run", false], [e.status, e.stop?])
|
assert_equal(["run", false], [es1, es2])
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
a.kill if a
|
a.kill if a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue