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.
This commit is contained in:
Vincent Petry 2014-08-20 15:57:30 +02:00
parent 068f9d10f1
commit 04c982a96e

View file

@ -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');
}