Skip to content

Commit 88d1f9e

Browse files
committed
Fix timeout specs
* The timeout might not happen immediately due to GC, context switches, other processes, load, etc.
1 parent 4674e25 commit 88d1f9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/ruby/library/timeout/timeout_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
it "raises Timeout::Error when it times out with no specified error type" do
66
lambda {
77
Timeout.timeout(1) do
8-
sleep 3
8+
sleep
99
end
1010
}.should raise_error(Timeout::Error)
1111
end
1212

1313
it "raises specified error type when it times out" do
1414
lambda do
1515
Timeout.timeout(1, StandardError) do
16-
sleep 3
16+
sleep
1717
end
1818
end.should raise_error(StandardError)
1919
end

0 commit comments

Comments
 (0)