Skip to content

Commit

Permalink
Merge pull request #29104 from owncloud/ui-test-timers
Browse files Browse the repository at this point in the history
Set a minimum timeout for UI test waits
  • Loading branch information
phil-davis authored Sep 28, 2017
2 parents 336789a + d262810 commit 910716b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/ui/features/bootstrap/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@

// Default timeout for use in code that needs to wait for the UI
const STANDARDUIWAITTIMEOUTMILLISEC = 10000;
// Minimum timeout for use in code that needs to wait for the UI
const MINIMUMUIWAITTIMEOUTMILLISEC = 500;
3 changes: 2 additions & 1 deletion tests/ui/features/lib/OwncloudPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ public function waitForAjaxCallsToStartAndFinish(
$this->waitForAjaxCallsToStart($session);
$end = microtime(true);
$timeout_msec = $timeout_msec - (($end - $start) * 1000);
$timeout_msec = max($timeout_msec, MINIMUMUIWAITTIMEOUTMILLISEC);
$this->waitForOutstandingAjaxCalls($session, $timeout_msec);
}

Expand Down Expand Up @@ -403,4 +404,4 @@ protected function cleanInputAndSetValue(NodeElement $inputField, $value) {
throw new \Exception("value of input field is not what we expect");
}
}
}
}

0 comments on commit 910716b

Please sign in to comment.