From: Vincent Petry Date: Wed, 20 Aug 2014 13:57:30 +0000 (+0200) Subject: Fix unit test messing up the transaction on Oracle X-Git-Tag: v8.0.0alpha1~846^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=04c982a96e19f2254739c24ee8c6b568edcb4190;p=nextcloud-server.git 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. --- diff --git a/tests/lib/db/mdb2schemamanager.php b/tests/lib/db/mdb2schemamanager.php index 51e3c7002f4..dd9ee3adb8e 100644 --- a/tests/lib/db/mdb2schemamanager.php +++ b/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'); }