summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-08-20 15:57:30 +0200
committerVincent Petry <pvince81@owncloud.com>2014-08-20 23:14:06 +0200
commit04c982a96e19f2254739c24ee8c6b568edcb4190 (patch)
tree23451eaf41bde5343c2fd18afabc8ecc73f69688
parent068f9d10f1fec99cebf2ec29de2a09b4b34362b5 (diff)
downloadnextcloud-server-04c982a96e19f2254739c24ee8c6b568edcb4190.tar.gz
nextcloud-server-04c982a96e19f2254739c24ee8c6b568edcb4190.zip
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.
-rw-r--r--tests/lib/db/mdb2schemamanager.php5
1 files changed, 5 insertions, 0 deletions
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');
}