From 5f901117a87dc0de4330b6e22b31e5437a7d27ee Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Wed, 21 May 2014 18:20:18 +0800 Subject: [PATCH] Revert "MDL-45606 Unit test fix for MySQL and added a comment about the removed code." This reverts commit 0f18f3fa6ff3761ca2bdc0f61a2b0ab9c1553ca9. --- lib/phpunit/classes/util.php | 3 --- question/engine/tests/questionusage_autosave_test.php | 6 ------ 2 files changed, 9 deletions(-) diff --git a/lib/phpunit/classes/util.php b/lib/phpunit/classes/util.php index a03f98231bc..19e8a95253c 100644 --- a/lib/phpunit/classes/util.php +++ b/lib/phpunit/classes/util.php @@ -106,9 +106,6 @@ 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(); diff --git a/question/engine/tests/questionusage_autosave_test.php b/question/engine/tests/questionusage_autosave_test.php index e846bc5ff99..14315408c79 100644 --- a/question/engine/tests/questionusage_autosave_test.php +++ b/question/engine/tests/questionusage_autosave_test.php @@ -685,10 +685,4 @@ 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(); - } }