Fix unit test messing up the transaction on Oracle

Since the unit test is skipped anyway for Oracle, the dropTable() call
should be skipped as well to avoid having a leftover transaction and
cause further transactions to be nested and break the next test suites
requiring transactions.
remotes/origin/fix-10825
Vincent Petry 11 years ago
parent 068f9d10f1
commit 04c982a96e
  1. 5
      tests/lib/db/mdb2schemamanager.php

@ -12,6 +12,11 @@ namespace Test\DB;
class MDB2SchemaManager extends \PHPUnit_Framework_TestCase {
public function tearDown() {
// do not drop the table for Oracle as it will create a bogus transaction
// that will break the following test suites requiring transactions
if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') === 'oci') {
return;
}
\OC_DB::dropTable('table');
}

Loading…
Cancel
Save