diff --git a/analytics/tests/fixtures/test_analysis.php b/analytics/tests/fixtures/test_analysis.php index 6af04d1f2ea..b4e85d2b032 100644 --- a/analytics/tests/fixtures/test_analysis.php +++ b/analytics/tests/fixtures/test_analysis.php @@ -41,7 +41,7 @@ class test_analysis extends \core_analytics\analysis { */ public function process_analysable(\core_analytics\analysable $analysable): array { // Half a second. - usleep(500000); + sleep(1); return parent::process_analysable($analysable); } } diff --git a/analytics/tests/model_test.php b/analytics/tests/model_test.php index 55596511a79..9d5bdd2b1e9 100644 --- a/analytics/tests/model_test.php +++ b/analytics/tests/model_test.php @@ -292,7 +292,7 @@ class analytics_model_testcase extends advanced_testcase { $this->resetAfterTest(true); - set_config('modeltimelimit', 1, 'analytics'); + set_config('modeltimelimit', 2, 'analytics'); $courses = array(); for ($i = 0; $i < 5; $i++) { diff --git a/lib/tests/time_splittings_test.php b/lib/tests/time_splittings_test.php index 6587a70269b..d36f9b97b18 100644 --- a/lib/tests/time_splittings_test.php +++ b/lib/tests/time_splittings_test.php @@ -303,7 +303,7 @@ class core_analytics_time_splittings_testcase extends advanced_testcase { $mostrecentrange = reset($mostrecentrange); // We wait for the next range to be added. - usleep(1000000); + sleep(1); // We set the analysable again so the time ranges are recalculated. $seconds->set_analysable($analysable); @@ -344,7 +344,7 @@ class core_analytics_time_splittings_testcase extends advanced_testcase { $this->mock_cache_first_analysis_caching($modelid, $analysable->get_id(), end($ranges)); // We wait for the next range to be added. - usleep(1000000); + sleep(1); // We set the analysable again so the time ranges are recalculated. $upcomingseconds->set_analysable($analysable);