File tree Expand file tree Collapse file tree 2 files changed +0
-13
lines changed Expand file tree Collapse file tree 2 files changed +0
-13
lines changed Original file line number Diff line number Diff line change 18
18
end . should raise_error ( StandardError )
19
19
end
20
20
21
- it "does not wait too long" do
22
- before_time = Time . now
23
- lambda do
24
- Timeout . timeout ( 1 , StandardError ) do
25
- sleep 3
26
- end
27
- end . should raise_error ( StandardError )
28
-
29
- ( Time . now - before_time ) . should be_close ( 1.0 , 0.5 )
30
- end
31
-
32
21
it "returns back the last value in the block" do
33
22
Timeout . timeout ( 1 ) do
34
23
42
Original file line number Diff line number Diff line change 1
1
slow:Timeout.timeout raises Timeout::Error when it times out with no specified error type
2
2
slow:Timeout.timeout raises specified error type when it times out
3
- slow:Timeout.timeout does not wait too long
4
3
slow:Timeout.timeout returns back the last value in the block
5
4
aot:Timeout.timeout raises Timeout::Error when it times out with no specified error type
6
5
aot:Timeout.timeout raises specified error type when it times out
7
- aot:Timeout.timeout does not wait too long
You can’t perform that action at this time.
0 commit comments