mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_thread.rb: wait for the thread to sleep
* test/ruby/test_thread.rb (test_thread_name): wait for the status of the subject thread to fix, so that the status does not change between two inspect methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0a641b4cc2
commit
4a3462bde2
1 changed files with 1 additions and 0 deletions
|
@ -1067,6 +1067,7 @@ q.pop
|
|||
|
||||
def test_thread_name
|
||||
t = Thread.start {sleep}
|
||||
sleep 0.001 until t.stop?
|
||||
assert_nil t.name
|
||||
s = t.inspect
|
||||
t.name = 'foo'
|
||||
|
|
Loading…
Reference in a new issue