[BUGFIX] Fix some sql errors running functional tests 46/48546/16
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 10 Jun 2016 08:38:47 +0000 (10:38 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 27 Jun 2016 13:40:59 +0000 (15:40 +0200)
When executing the functional tests, the setUp() method
uses the extbase ObjectManager to populate the database schema.
The ObjectManager however relies on ready database schema
in the object reflection. This chicken-egg situation triggers
a lot of sql errors like "table cf_extbase_object does not exist".
For now, the solution is to switch to the NullBackend for this
cache in functional tests LocalConfiguration, since using
the object manager can not be dropped easily.
travis-ci does not show these failing queries due to the
parellelization, this part, together with other failing
queries should be fixed with further patches.

Change-Id: Ic41fbcf44d8daa368985a7c6c389ffd0d61e3450
Resolves: #76573
Releases: master
Reviewed-on: https://review.typo3.org/48546
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Tests/FunctionalTestCase.php

index 8679415..bd04e12 100644 (file)
@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Core\Tests;
  */
 
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
+use TYPO3\CMS\Core\Cache\Backend\NullBackend;
 use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Tests\Functional\Framework\Frontend\Response;
@@ -235,6 +236,7 @@ abstract class FunctionalTestCase extends BaseTestCase
             $localConfiguration['SYS']['debugExceptionHandler'] = '';
             $localConfiguration['SYS']['trustedHostsPattern'] = '.*';
             $localConfiguration['SYS']['setDBinit'] = 'SET SESSION sql_mode = \'STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY\';';
+            $localConfiguration['SYS']['caching']['cacheConfigurations']['extbase_object']['backend'] = NullBackend::class;
             $testbase->setUpLocalConfiguration($this->instancePath, $localConfiguration, $this->configurationToUseInTestInstance);
             $defaultCoreExtensionsToLoad = [
                 'core',