MDL-45606 Unit test fix for MySQL and added a comment about the removed code.
This commit is contained in:
committed by
Marina Glancy
parent
d4a84d8f0c
commit
0f18f3fa6f
@@ -106,6 +106,9 @@ class phpunit_util extends testing_util {
|
||||
// Stop any message redirection.
|
||||
phpunit_util::stop_phpmailer_redirection();
|
||||
|
||||
// We used to call gc_collect_cycles here to ensure desctructors were called between tests.
|
||||
// This accounted for 25% of the total time running phpunit - so we removed it.
|
||||
|
||||
// Show any unhandled debugging messages, the runbare() could already reset it.
|
||||
self::display_debugging_messages();
|
||||
self::reset_debugging();
|
||||
|
||||
@@ -685,4 +685,10 @@ class question_usage_autosave_test extends qbehaviour_walkthrough_test_base {
|
||||
|
||||
$this->delete_quba();
|
||||
}
|
||||
|
||||
protected function tearDown() {
|
||||
// This test relies on the destructor for the second DB connection being called before running the next test.
|
||||
// Without this change - there will be unit test failures on "some" DBs (MySQL).
|
||||
gc_collect_cycles();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user