Skip to content

Commit b1bf2d9

Browse files
committed
Test that no time limits do not trigger timeout handler
1 parent 1d0ab53 commit b1bf2d9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/AsyncTaskTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,15 @@ public function testAsyncTimeoutIgnoreNoProblem()
177177
// should have timed out
178178
$this->assertFileDoesNotExist($textFilePath, "The async task timeout handler was inappropriately triggered (finishing a task before the time limit should not trigger timeouts).");
179179
$this->assertNoNohupFile();
180+
181+
// repeat with no time limit
182+
$task = new AsyncTask($timeoutTask);
183+
$task->withoutTimeLimit()->start();
184+
// we wait for it to timeout
185+
$this->sleep(0.5);
186+
// should have timed out
187+
$this->assertFileDoesNotExist($textFilePath, "The async task timeout handler was inappropriately triggered (tasks without time limits should not trigger timeouts).");
188+
$this->assertNoNohupFile();
180189
}
181190

182191
public function testAsyncTimeoutIgnoreENotice()

0 commit comments

Comments
 (0)