Skip to content

Commit a6ac0c6

Browse files
p-schlickmannrosa
authored andcommitted
Ensure dispatcher is stopped after assertion
1 parent 1a2e380 commit a6ac0c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/unit/dispatcher_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ class DispatcherTest < ActiveSupport::TestCase
107107

108108
assert_equal 0, SolidQueue::ScheduledExecution.count
109109
assert_equal 3, SolidQueue::ReadyExecution.count
110+
ensure
111+
dispatcher.stop
110112
end
111113

112114
test "sleeps `polling_interval` between polls if there are no un-dispatched jobs" do
@@ -117,6 +119,8 @@ class DispatcherTest < ActiveSupport::TestCase
117119

118120
dispatcher.start
119121
wait_while_with_timeout(1.second) { !SolidQueue::ScheduledExecution.exists? }
122+
ensure
123+
dispatcher.stop
120124
end
121125

122126
private

0 commit comments

Comments
 (0)