$this->pluginService->refreshPlugins($this->context, newNullIO()); $this->connection->executeStatement('DELETE FROM plugin WHERE `name` = "SwagTest"'); }
privatestaticfunctionretry(Connection $connection, \Closure $closure, int $counter) { ++$counter;
try{ return$connection->transactional($closure); }catch(RetryableException $retryableException){ if($connection->getTransactionNestingLevel() > 0){ // If this RetryableTransaction was executed inside another transaction, do not retry this nested
// transaction. Remember that the whole (outermost) transaction was already rolled back by the database
// when any RetryableException is thrown.
// Rethrow the exception here so only the outermost transaction is retried which in turn includes this
// nested transaction.
throw$retryableException; }
static::assertEquals( 1, $connection->getTransactionNestingLevel(), 'Too many Nesting Levels.
Probably one transaction was not closed properly.
This may affect following Tests in an unpredictable manner!
Current nesting level: "' . $connection->getTransactionNestingLevel() . '".' );
self::assertEquals( 1, $connection->getTransactionNestingLevel(), 'Too many Nesting Levels.
Probably one transaction was not closed properly.
This may affect following Tests in an unpredictable manner!
Current nesting level: "' . $connection->getTransactionNestingLevel() . '".' );
privatestaticfunctionretry(?Connection $connection, \Closure $closure, int $counter) { ++$counter;
try{ return$closure(); }catch(RetryableException $e){ if($connection && $connection->getTransactionNestingLevel() > 0){ // If this closure was executed inside a transaction, do not retry. Remember that the whole (outermost)
// transaction was already rolled back by the database when any RetryableException is thrown. Rethrow
// the exception here so only the outermost transaction is retried which in turn includes this closure.
throw$e; }