MDL-47675 phpunit: Update unit tests to pass on MSSQL
Unit tests were failing on MSSQL. gc_collect_cycles() was removed from the phpunit utils.php file to save time in running the tests, but MSSQL doesn't clean up open files as well as other databases. This patch includes the garbage collection for the unit tests that require it.
This commit is contained in:
@@ -36,6 +36,13 @@ require_once($CFG->libdir . '/csvlib.class.php');
|
||||
*/
|
||||
class tool_uploadcourse_processor_testcase extends advanced_testcase {
|
||||
|
||||
/**
|
||||
* Tidy up open files that may be left open.
|
||||
*/
|
||||
protected function tearDown() {
|
||||
gc_collect_cycles();
|
||||
}
|
||||
|
||||
public function test_basic() {
|
||||
global $DB;
|
||||
$this->resetAfterTest(true);
|
||||
|
||||
Reference in New Issue
Block a user