diff --git a/tests/TaskHandlerTest.php b/tests/TaskHandlerTest.php index cb058fa..67d9139 100644 --- a/tests/TaskHandlerTest.php +++ b/tests/TaskHandlerTest.php @@ -64,13 +64,12 @@ public function it_prevents_overlapping_if_the_command_is_scheduled_without_over $mutex = head(app(Schedule::class)->events())->mutexName(); - cache()->add($mutex, true, 60); - $this->call('POST', '/cloud-scheduler-job', content: 'php artisan test:command'); $this->assertLoggedLines(1); - cache()->delete($mutex); + $event = head(app(Schedule::class)->events()); + $event->mutex->forget($event); $this->call('POST', '/cloud-scheduler-job', content: 'php artisan test:command');