summaryrefslogtreecommitdiff
path: root/spec/ruby/core/thread/shared/wakeup.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/thread/shared/wakeup.rb')
-rw-r--r--spec/ruby/core/thread/shared/wakeup.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ruby/core/thread/shared/wakeup.rb b/spec/ruby/core/thread/shared/wakeup.rb
index f111edf0fd..c89235ba60 100644
--- a/spec/ruby/core/thread/shared/wakeup.rb
+++ b/spec/ruby/core/thread/shared/wakeup.rb
@@ -36,7 +36,7 @@ describe :thread_wakeup, shared: true do
it "does not result in a deadlock" do
t = Thread.new do
- 100.times { Thread.stop }
+ 10.times { Thread.stop }
end
while t.status
@@ -47,6 +47,7 @@ describe :thread_wakeup, shared: true do
t.status.should == false
end
Thread.pass
+ sleep 0.001
end
t.status.should == false
@@ -56,6 +57,6 @@ describe :thread_wakeup, shared: true do
it "raises a ThreadError when trying to wake up a dead thread" do
t = Thread.new { 1 }
t.join
- -> { t.send @method }.should raise_error(ThreadError)
+ -> { t.send @method }.should.raise(ThreadError)
end
end