From 474f45c85e2f3faefc4d4d1b8fff624626fbce7f Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 20 Apr 2021 10:37:27 +0200 Subject: [PATCH] tests: add timeout after executing fiunction for webhooks --- tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php index c8e3ba747d..2ac18bac2d 100644 --- a/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php +++ b/tests/e2e/Services/Webhooks/WebhooksCustomServerTest.php @@ -461,6 +461,8 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($execution['headers']['status-code'], 201); $this->assertNotEmpty($execution['body']['$id']); + sleep(7); + $webhook = $this->getLastRequest(); $this->assertEquals($webhook['method'], 'POST'); @@ -471,8 +473,7 @@ class WebhooksCustomServerTest extends Scope $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Id'] ?? '', $this->getProject()['webhookId']); $this->assertEquals($webhook['headers']['X-Appwrite-Webhook-Project-Id'] ?? '', $this->getProject()['$id']); - // wait for timeout function to complete (sleep(5);) - sleep(6); + sleep(7); $webhook = $this->getLastRequest();