Skip to content

Commit 960af94

Browse files
committed
Add test to verify that TimerSet#post returns true
1 parent 5569f63 commit 960af94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/concurrent/executor/timer_set_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ module Concurrent
3535
expect(latch.wait(0.2)).to be_truthy
3636
end
3737

38+
it 'returns true when posting a task' do
39+
expect(subject.post(0.1) { nil }).to be true
40+
end
41+
3842
it 'executes a given task when given an interval in seconds, even if longer tasks have been scheduled' do
3943
latch = CountDownLatch.new(1)
4044
subject.post(0.5){ nil }

0 commit comments

Comments
 (0)