Skip to content

Commit fb6af87

Browse files
fixing test
Signed-off-by: Lennart Kuijs <[email protected]>
1 parent a606918 commit fb6af87

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

tests/integration/IntegrationTest.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,16 +274,27 @@ public function testDeleteChannels()
274274
$this->assertTrue(array_key_exists("task_id", (array)$response));
275275

276276
$taskId = $response["task_id"];
277-
for ($i = 0; $i < 30; $i++) {
277+
$completed = false;
278+
while (!$completed) {
278279
$response = $this->client->getTask($taskId);
279280
if ($response["status"] == "completed") {
280-
$this->assertSame($response["result"][$c1->getCID()]["status"], "ok");
281-
$this->assertSame($response["result"][$c2->getCID()]["status"], "ok");
282-
return;
281+
$completed = true;
283282
}
284283
usleep(500000);
285284
}
286-
$this->assertSame($response["status"], "completed");
285+
$this->assertSame("ok", $response["result"][$c1->getCID()]["status"]);
286+
$this->assertSame("ok", $response["result"][$c2->getCID()]["status"]);
287+
288+
// for ($i = 0; $i < 30; $i++) {
289+
// $response = $this->client->getTask($taskId);
290+
// if ($response["status"] == "completed") {
291+
// $this->assertSame($response["result"][$c1->getCID()]["status"], "ok");
292+
// $this->assertSame($response["result"][$c2->getCID()]["status"], "ok");
293+
// return;
294+
// }
295+
// usleep(500000);
296+
// }
297+
$this->assertSame("completed", $response["status"]);
287298
}
288299

289300
public function testDeactivateUser()

0 commit comments

Comments
 (0)