MDL-60555 core_search: Change unit tests to use fake time
Using real time caused rare failures. I've changed it to use fake measurement for the indexing timeouts, which were unit-tested.
This commit is contained in:
@@ -220,7 +220,7 @@ abstract class engine {
|
||||
// Stop if we have exceeded the time limit (and there are still more items). Always
|
||||
// do at least one second's worth of documents otherwise it will never make progress.
|
||||
if ($lastindexeddoc !== $firstindexeddoc &&
|
||||
!empty($options['stopat']) && microtime(true) >= $options['stopat']) {
|
||||
!empty($options['stopat']) && manager::get_current_time() >= $options['stopat']) {
|
||||
$partial = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user