mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use only object_id to test living threads.
Previous test depends on timing like: <"[#<Thread:0x000008013413a0 run>, #<Thread:0x00000801341418 run>, #<Thread:0x00000801364940 run>]"> expected but was <"[#<Thread:0x000008013413a0 run>, #<Thread:0x00000801341418 sleep>, #<Thread:0x00000801364940 run>]">. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c840e4578f
commit
6b9c2e9d77
1 changed files with 2 additions and 2 deletions
|
@ -232,8 +232,8 @@ class TestThread < Test::Unit::TestCase
|
|||
Thread.pass
|
||||
t2 = Thread.new { loop { } }
|
||||
t3 = Thread.new { }.join
|
||||
p [Thread.current, t1, t2].sort_by {|t| t.object_id }
|
||||
p Thread.list.sort_by {|t| t.object_id }
|
||||
p [Thread.current, t1, t2].map{|t| t.object_id }.sort
|
||||
p Thread.list.map{|t| t.object_id }.sort
|
||||
INPUT
|
||||
assert_equal(r.first, r.last)
|
||||
assert_equal([], e)
|
||||
|
|
Loading…
Reference in a new issue