Issue Bug Closed

#80227Error message: Can't drop database 'functional_test_ft17d7b9a'; database doesn't exist

Mark Watney 03/10/17, 12:52 updated 06/29/17, 22:36

Description

We sometimes (quite often) get error messages like this when executing tests using TYPO3’s Functional Testing framework:

Can't drop database 'functional_test_ft17d7b9a'; database doesn't exist

I wonder how this can happen – in `TYPO3\Components\TestingFramework\Core\Testbase::setUpTestDatabase()` there is this check:

if (in_array($databaseName, $schemaManager->listDatabases(), true)) {
    $schemaManager->dropDatabase($databaseName);
}

This is the stack trace:

There were 8 errors:

1) FES\Base\Tests\Functional\Service\SettingsServiceTest::canReturnFrameworkConfiguration
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'DROP DATABASE functional_test_ft17d7b9a':

Can't drop database 'functional_test_ft17d7b9a'; database doesn't exist

/var/lib/jenkins/jobs/my-project/workspace/Web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115
/var/lib/jenkins/jobs/my-project/workspace/Web/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:128
/var/lib/jenkins/jobs/my-project/workspace/Web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1015
/var/lib/jenkins/jobs/my-project/workspace/Web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:1017
/var/lib/jenkins/jobs/my-project/workspace/Web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:337
/var/lib/jenkins/jobs/my-project/workspace/Web/typo3_src/components/testing_framework/Classes/Core/Testbase.php:499
/var/lib/jenkins/jobs/my-project/workspace/Web/typo3_src/components/testing_framework/Classes/Core/Functional/FunctionalTestCase.php:254
/var/lib/jenkins/jobs/my-project/workspace/Web/typo3conf/ext/fes_base/Tests/Functional/Service/SettingsServiceTest.php:29

Caused by
Doctrine\DBAL\Driver\Mysqli\MysqliException: Can't drop database 'functional_test_ft17d7b9a'; database doesn't exist

/var/lib/jenkins/jobs/my-project/workspace/Web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php:150
/var/lib/jenkins/jobs/my-project/workspace/Web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1012
/var/lib/jenkins/jobs/my-project/workspace/Web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:1017
/var/lib/jenkins/jobs/my-project/workspace/Web/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:337
/var/lib/jenkins/jobs/my-project/workspace/Web/typo3_src/components/testing_framework/Classes/Core/Testbase.php:499
/var/lib/jenkins/jobs/my-project/workspace/Web/typo3_src/components/testing_framework/Classes/Core/Functional/FunctionalTestCase.php:254
/var/lib/jenkins/jobs/my-project/workspace/Web/typo3conf/ext/my_extension/Tests/Functional/Service/SettingsServiceTest.php:29

Are we doing something wrong or is this a bug?

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.