From 0f51ff5b1d17c3790916ac6f16f8efff9c226ad5 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 1 Nov 2024 19:33:38 +0000 Subject: [PATCH] chore: remove sleep for one second and use carbon to jump forward --- tests/Integration/Models/ThreadTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Integration/Models/ThreadTest.php b/tests/Integration/Models/ThreadTest.php index 48f96cced..abd479325 100644 --- a/tests/Integration/Models/ThreadTest.php +++ b/tests/Integration/Models/ThreadTest.php @@ -88,7 +88,7 @@ $threadFromToday = createThreadFromToday(); $threadFromTwoDaysAgo = createThreadFromTwoDaysAgo(); - sleep(1); + $this->travelTo(Carbon::now()->addSecond()); dispatch_sync(new CreateReply(Str::uuid(), 'Hello world', User::factory()->create(), $threadFromTwoDaysAgo));