Permalink
Browse files

MDL-35714 run gc before test reset

  • Loading branch information...
1 parent 562dbe4 commit 2104c9fdc36fcde4f4c35352257c53fed011cf28 @skodak skodak committed Oct 2, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/phpunit/classes/util.php
View
3 lib/phpunit/classes/util.php
@@ -544,6 +544,9 @@ public static function reset_dataroot() {
public static function reset_all_data($logchanges = false) {
global $DB, $CFG, $USER, $SITE, $COURSE, $PAGE, $OUTPUT, $SESSION, $GROUPLIB_CACHE;
+ // Release memory and indirectly call destroy() methods to release resource handles, etc.
+ gc_collect_cycles();
+
// reset global $DB in case somebody mocked it
$DB = self::get_global_backup('DB');

0 comments on commit 2104c9f

Please sign in to comment.