File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments