MDL-57015 tests: Use preventResetByRollback() if test uses transactions
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 17 Nov 2016 01:13:02 +0000 (02:13 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 17 Nov 2016 01:41:31 +0000 (02:41 +0100)
admin/tool/lpmigrate/tests/processor_test.php

index 792a902..78eb45b 100644 (file)
@@ -396,12 +396,8 @@ class tool_lpmigrate_framework_processor_testcase extends advanced_testcase {
     }
 
     public function test_permission_exception() {
-        global $DB;
-        if ($DB->get_dbfamily() === 'postgres' or $DB->get_dbfamily() === 'mssql') {
-            $this->markTestSkipped('The processor is having issues with the transaction initialised in '
-                . 'advanced_testcase::runBare().');
-            return;
-        }
+
+        $this->preventResetByRollback(); // Test uses transactions, so we cannot use them for speedy reset.
 
         $dg = $this->getDataGenerator();
         $u = $dg->create_user();