test: fix
This commit is contained in:
parent
6f38ef3a18
commit
10e37bb8ca
1 changed files with 7 additions and 16 deletions
|
@ -260,7 +260,7 @@ class FunctionsCustomClientTest extends Scope
|
|||
|
||||
$executionId = $execution['body']['$id'];
|
||||
|
||||
while (true) {
|
||||
sleep(12);
|
||||
|
||||
$execution = $this->client->call(Client::METHOD_GET, '/functions/' . $function['body']['$id'] . '/executions/' . $executionId, [
|
||||
'content-type' => 'application/json',
|
||||
|
@ -268,16 +268,7 @@ class FunctionsCustomClientTest extends Scope
|
|||
'x-appwrite-key' => $this->getProject()['apiKey'],
|
||||
]);
|
||||
|
||||
if (
|
||||
$execution['headers']['status-code'] >= 400
|
||||
|| \in_array($execution['body']['status'], ['completed', 'failed'])
|
||||
) {
|
||||
break;
|
||||
}
|
||||
|
||||
\sleep(1);
|
||||
}
|
||||
|
||||
$this->assertEquals(200, $execution['headers']['status-code']);
|
||||
$this->assertEquals('completed', $execution['body']['status'], \json_encode($execution['body']));
|
||||
|
||||
// Cleanup : Delete function
|
||||
|
|
Loading…
Reference in a new issue