Project

General

Profile

Bug #80227

Updated by Mark Watney over 7 years ago

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

 <pre> ``` 
 Can't drop database 'functional_test_ft17d7b9a'; database doesn't exist 
 </pre> ``` 

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

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

 This is the stack trace: 

 <pre> ``` 
 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 
 </pre> ``` 

 Are we doing something wrong or is this a bug?

Back