Skip to content

Commit 46deaf9

Browse files
Merge pull request #41 from stackkit/bugfix/mutex-name
Fix test with mutex
2 parents b2b046c + 5cc0541 commit 46deaf9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/TaskHandlerTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,12 @@ public function it_prevents_overlapping_if_the_command_is_scheduled_without_over
6464

6565
$mutex = head(app(Schedule::class)->events())->mutexName();
6666

67-
cache()->add($mutex, true, 60);
68-
6967
$this->call('POST', '/cloud-scheduler-job', content: 'php artisan test:command');
7068

7169
$this->assertLoggedLines(1);
7270

73-
cache()->delete($mutex);
71+
$event = head(app(Schedule::class)->events());
72+
$event->mutex->forget($event);
7473

7574
$this->call('POST', '/cloud-scheduler-job', content: 'php artisan test:command');
7675

0 commit comments

Comments
 (0)