Skip to content

Commit c7218d0

Browse files
committed
Adjust test
1 parent d2316dc commit c7218d0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/Integration/Queue/JobDispatchingTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,14 @@ public function testUniqueJobLockIsReleasedForJobDispatchedAfterResponse()
142142

143143
public function testDispatchDeferDelaysDispatchingUntilDeferredCallbacksAreRun()
144144
{
145-
$this->assertFalse(Job::$ran);
146-
147145
Job::dispatchDefer('test');
148146

149147
$this->assertFalse(Job::$ran);
150-
$this->app[DeferredCallbackCollection::class]->invoke();
148+
$this->runQueueWorkerCommand(['--stop-when-empty' => true]);
149+
$this->assertFalse(Job::$ran);
150+
151+
$this->app->get(DeferredCallbackCollection::class)->invoke();
152+
$this->runQueueWorkerCommand(['--stop-when-empty' => true]);
151153
$this->assertTrue(Job::$ran);
152154
}
153155

0 commit comments

Comments
 (0)