From 5cc05417cc8532fd75ce5e7bbedc32a0352accb7 Mon Sep 17 00:00:00 2001 From: Marick van Tuil Date: Sun, 9 Nov 2025 13:00:55 +0100 Subject: [PATCH] Fix test with mutex --- tests/TaskHandlerTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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');