mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
chore: added maxtimeout to testChannelExecutions
This commit is contained in:
@@ -1311,6 +1311,8 @@ class RealtimeCustomClientTest extends Scope
|
||||
$this->assertEquals($deployment['headers']['status-code'], 202);
|
||||
$this->assertNotEmpty($deployment['body']['$id']);
|
||||
|
||||
$maxTimeSeconds = 10;
|
||||
$startTime = time();
|
||||
// Poll until deployment is built
|
||||
while (true) {
|
||||
$deployment = $this->client->call(Client::METHOD_GET, '/functions/' . $function['body']['$id'] . '/deployments/' . $deploymentId, [
|
||||
@@ -1326,6 +1328,10 @@ class RealtimeCustomClientTest extends Scope
|
||||
break;
|
||||
}
|
||||
|
||||
if (time() - $startTime >= $maxTimeSeconds) {
|
||||
throw new \Exception('Deployment timed out after ' . $maxTimeSeconds . ' seconds');
|
||||
}
|
||||
|
||||
\sleep(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user