-
Bug
-
Resolution: Fixed
-
Minor
-
3.1.5, 3.2.2, 3.3
-
MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
-
MOODLE_31_STABLE, MOODLE_32_STABLE
-
MDL-58450_master -
We started seeing the following phpunit failure during 27 March 2017 cycle:
/var/www/html/moodle/lib/phpunit/classes/advanced_testcase.php:80
|
|
To re-run:
|
vendor/bin/phpunit mod_forum_lib_testcase mod/forum/tests/lib_test.php
|
|
FAILURES!
|
Tests: 7802, Assertions: 109663, Failures: 1, Skipped: 53.
|
test_forum_get_discussions_with_groups is the test that is failing. Bisect said it is 4ca2890. It actually is just a coincidence, after 4ca2890 the failing test $group1 and $group2 have group names group-999 and group-1000. $user1 is assigned to both groups, the failing test has a comment Test retrieve discussions not passing the groupid parameter. We will receive only first group discussions.
Following forum_get_discussions -> groups_get_activity_group -> groups_get_all_groups, we see that the returned groups are ordered by name, so the first returned group is not group-999, but group-1000 because order by returns group-1000 first. Therefore the returned discussions are $group2 discussions = 1, not 2.
- will be (partly) resolved by
-
MDL-58583 Phpunit reset could restart generators counters and generate string names (instead of num sequences) to prevent more pseudo-random phpunit failures
- Closed