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:
parent
068f9d10f1
commit
04c982a96e
1 changed files with 5 additions and 0 deletions
|
@ -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…
Reference in a new issue