From 04c982a96e19f2254739c24ee8c6b568edcb4190 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 20 Aug 2014 15:57:30 +0200 Subject: [PATCH] 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. --- tests/lib/db/mdb2schemamanager.php | 5 +++++ 1 file changed, 5 insertions(+) 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'); } -- 2.39.5