Skip to content

Commit

Permalink
Fix schedule/basic test: add 10 sec timeout to find schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Oct 8, 2024
1 parent caffa59 commit b99c37e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions features/schedule/basic/feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,18 @@ public static function check(

// Confirm simple list
$found = false;
$deadline = \microtime(true) + 10;
find:
foreach ($client->listSchedules() as $schedule) {
if ($schedule->scheduleId === $scheduleId) {
$found = true;
break;
}
}
if (!$found and \microtime(true) < $deadline) {
goto find;
}

$found or throw new \Exception('Schedule not found');

// Wait for first completion
Expand Down

0 comments on commit b99c37e

Please sign in to comment.