Skip to content

Commit 0bc7e33

Browse files
committed
Try to stabilize the test case
1 parent 81f41c9 commit 0bc7e33

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/AsyncTaskTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,10 @@ public function testAsyncTaskNormalStatus()
247247
// now we start running the task
248248
$liveStatus = $task->start();
249249

250-
// the task is to sleep for 2 seconds, and then exit.
250+
// try to sleep a bit, to stabilize the test case
251+
sleep(1);
252+
253+
// the task is to sleep for some time, and then exit.
251254
// note: since checking the task statuses take some time, we cannot confirm the actual elapsed time of our tests,
252255
// and so "task ended" case is not testable
253256
$this->assertFalse($preStatus->isRunning(), "Stopped tasks should always report \"task stopped\".");

0 commit comments

Comments
 (0)