-
Bug
-
Resolution: Fixed
-
Minor
-
3.9.16, 3.11.9, 4.0.2, 4.0.3
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MDL-75231-master -
-
1
-
Team Omega 4.1 Sprint 0.2, Team Omega 4.1 Sprint 0.3
We have seen a random unittest failure on Oracle (slow DB):
core_filelib_testcase::test_file_is_draft_areas_limit_reached
|
Failed asserting that false is true.
|
|
/var/www/html/lib/tests/filelib_test.php:1728
|
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80
|
It can be reproduced by adding a "sleep(1)":
diff --git a/lib/tests/filelib_test.php b/lib/tests/filelib_test.php
|
index b66a2481273..5306fc03e5d 100644
|
--- a/lib/tests/filelib_test.php
|
+++ b/lib/tests/filelib_test.php
|
@@ -1721,6 +1721,7 @@ EOF;
|
$this->assertFalse(file_is_draft_areas_limit_reached($user->id));
|
|
// Only one item was leaked from the bucket. So the bucket should become full again if we add a single item to it.
|
+ sleep(1);
|
self::create_draft_file([
|
'filename' => 'file2.png',
|
'itemid' => $itemids[0],
|
The test looks fragile and time-sensitive
- has a non-specific relationship to
-
MDL-78832 Random unittest faillure in test_file_is_draft_areas_limit_reached (take 2)
- Development in progress