Skip to content

Commit e562671

Browse files
committed
Stabilize timeout test case timing
1 parent 925dfb5 commit e562671

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/AsyncTaskTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,12 @@ public function testAsyncTimeout()
141141
$task = new AsyncTask($timeoutTask);
142142
$task->withTimeLimit(1)->start();
143143
// we wait for it to timeout
144-
$this->sleep(0.4);
145-
$this->sleep(0.4);
146-
$this->sleep(0.4);
147-
$this->sleep(0.4);
144+
$this->sleep(0.3);
145+
$this->sleep(0.3);
146+
$this->sleep(0.3);
147+
$this->sleep(0.3);
148+
$this->sleep(0.3);
149+
$this->sleep(0.3);
148150
// should have timed out
149151
$this->assertFileExists($textFilePath, "The async task probably did not trigger its timeout handler because its timeout output file is not found.");
150152
$this->assertStringEqualsFile($textFilePath, $message);

0 commit comments

Comments
 (0)