From 3c3fee43dabe7c3f125b13b043911bc7af2c6ec2 Mon Sep 17 00:00:00 2001 From: Nathan Nguyen Date: Tue, 19 Oct 2021 14:03:55 +1100 Subject: [PATCH] MDL-60917 core_search: fix unit test --- search/tests/top_result_test.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/search/tests/top_result_test.php b/search/tests/top_result_test.php index 6354bdf2147..3ac6fd96e73 100644 --- a/search/tests/top_result_test.php +++ b/search/tests/top_result_test.php @@ -78,6 +78,8 @@ class search_top_result_testcase extends advanced_testcase { // Courses. $this->course1 = $generator->create_course(['fullname' => 'Top course result 1']); + // Ensure course 1 is indexed before course 2. + $this->run_index(); $this->course2 = $generator->create_course(['fullname' => 'Top course result 2']); // User 1.