summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-13 08:56:11 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-13 08:56:11 +0000
commit29513dbc47ba0277023fc12eb29d96df5a3662af (patch)
tree16666586865b72a1ab93314116fa29336610bc26
parent92ca9f0696738fae28c50ab05d553946bc49cc96 (diff)
sleep thread until assertions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_thread.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 3f4a8c8ea0..0eb57628d3 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -1048,9 +1048,11 @@ q.pop
end
def test_thread_name
- t = Thread.start { }
+ t = Thread.start { sleep }
t.name = 'foo'
assert_equal 'foo', t.name
+ ensure
+ t.kill
t.join
end
end