-
Bug
-
Resolution: Fixed
-
Critical
-
2.6.3
-
MOODLE_26_STABLE
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
MDL-45935-master -
-
5
-
FRONTEND Sprint 12
When we run behat backup tests, we pass a table such as:
When I backup "Course 2" course using this options:
|
| Filename | test_backup.mbz |
|
| setting_section_section_2_userinfo | 0 |
|
| setting_section_section_2_included | 0 |
|
| setting_section_section_4_userinfo | 0 |
|
| setting_section_section_4_included | 0 |
|
We then call i_backup_course_using_this_options, passing in those options. That in turn handles the backup process looking at each page.
At each page, it uses the following to fill in the form:
$this->fill_backup_restore_form($options);
|
Which then looks for each option in the table and fills it in. Since most of those settings are only found on one page, we then wait 12 seconds for the search for that option to fail to be found (which we ignore with a try/catch).
https://github.com/moodle/moodle/blob/master/backup/util/ui/tests/behat/behat_backup.php#L351
The result is that each test involving backups takes a good minute just to fill in the each page of the backup form, for three pages making about 3 minutes of wasted time in timeouts. By fixing this, we should be able to knock a good few minutes off behat runtimes.