[TYPO3-english] 4.5.37: Selenium makes the ObjectManager / ClassInfoCache crash (lost DB-connection?!)

Christian Stüdemann typo3.v01 at christian-stuedemann.de
Tue Nov 18 00:28:10 CET 2014


Dear all,

I run Typo3 4.5.37 with phpunit 3.7.22. As long as I run all unit tests 
without Selenium ("[ ] Run Selenium Tests" not checked) everything is 
fine. In the moment I check the "[ ] Run Selenium Tests" checkbox and 
run the tests, the second (!) call to the ObjectManager fails with the 
following exception / stacktrace. It does not matter, if the Selenium 
standalone server is running or not. Even if no Selenium test is 
performed at all, because of a missing selenium server, the same error 
occurs.

It's obvious that the ClassInfoCache used by the ObjectManager lost it's 
database connection. It does not matter, if the ObjectManager is called 
in a Selenium or in a non-Selenium Unit test. The first call works fine 
and the second leads to this error:

#0 [internal function]: PHPUnit_Util_ErrorHandler::handleError(2, 
'mysql_real_esca...', '/opt/typo3_src-...', 774, Array)
#1 /opt/typo3_src-4.5.37/t3lib/class.t3lib_db.php(774): 
mysql_real_escape_string('Tx_Extbase_MVC_...', 0)
#2 
/opt/typo3_src-4.5.37/t3lib/cache/backend/class.t3lib_cache_backend_dbbackend.php(205): 
t3lib_DB->fullQuoteStr('Tx_Extbase_MVC_...', 'tx_extbase_cach...')
#3 
/opt/typo3_src-4.5.37/t3lib/cache/frontend/class.t3lib_cache_frontend_abstractfrontend.php(103): 
t3lib_cache_backend_DbBackend->has('Tx_Extbase_MVC_...')
#4 
/opt/typo3_src-4.5.37/typo3/sysext/extbase/Classes/Object/Container/ClassInfoCache.php(59): 
t3lib_cache_frontend_AbstractFrontend->has('Tx_Extbase_MVC_...')
#5 
/opt/typo3_src-4.5.37/typo3/sysext/extbase/Classes/Object/Container/Container.php(289): 
Tx_Extbase_Object_Container_ClassInfoCache->has('Tx_Extbase_MVC_...')
#6 
/opt/typo3_src-4.5.37/typo3/sysext/extbase/Classes/Object/Container/Container.php(127): 
Tx_Extbase_Object_Container_Container->getClassInfo('Tx_Extbase_MVC_...')
#7 
/opt/typo3_src-4.5.37/typo3/sysext/extbase/Classes/Object/Container/Container.php(95): 
Tx_Extbase_Object_Container_Container->getInstanceInternal('Tx_Extbase_MVC_...', 
Array)
#8 
/opt/typo3_src-4.5.37/typo3/sysext/extbase/Classes/Object/ObjectManager.php(83): 
Tx_Extbase_Object_Container_Container->getInstance('Tx_Extbase_MVC_...', 
Array)
#9 
/opt/typo3_src-4.5.37/typo3/sysext/extbase/Classes/MVC/Controller/AbstractController.php(167): 
Tx_Extbase_Object_ObjectManager->create('Tx_Extbase_MVC_...')
#10 
/home/christian/workspace/.sandbox/csevents/Tests/Unit/Controller/AppointmentControllerTest.php(51): 
Tx_Extbase_MVC_Controller_AbstractController->injectObjectManager(Object(Tx_Extbase_Object_ObjectManager))
#11 
/home/.sdb/var/www/html/dummy-4.5.37/typo3conf/ext/phpunit/Composer/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(828): 
Tx_Csevents_Tests_Unit_Controller_AppointmentControllerTest->setUp()
#12 
/opt/typo3_src-4.5.37/typo3/sysext/extbase/Tests/Unit/BaseTestCase.php(62): 
PHPUnit_Framework_TestCase->runBare()
#13 
/home/.sdb/var/www/html/dummy-4.5.37/typo3conf/ext/phpunit/Composer/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php(648): 
Tx_Extbase_Tests_Unit_BaseTestCase->runBare()
#14 
/home/.sdb/var/www/html/dummy-4.5.37/typo3conf/ext/phpunit/Composer/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(776): 
PHPUnit_Framework_TestResult->run(Object(Tx_Csevents_Tests_Unit_Controller_AppointmentControllerTest))
#15 
/home/.sdb/var/www/html/dummy-4.5.37/typo3conf/ext/phpunit/Composer/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(775): 
PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult))
#16 
/home/.sdb/var/www/html/dummy-4.5.37/typo3conf/ext/phpunit/Composer/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(745): 
PHPUnit_Framework_TestSuite->runTest(Object(Tx_Csevents_Tests_Unit_Controller_AppointmentControllerTest), 
Object(PHPUnit_Framework_TestResult))
#17 
/home/.sdb/var/www/html/dummy-4.5.37/typo3conf/ext/phpunit/Composer/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(705): 
PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), 
false, Array, Array, false)
#18 
/home/.sdb/var/www/html/dummy-4.5.37/typo3conf/ext/phpunit/Classes/BackEnd/Module.php(831): 
PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult))
#19 
/home/.sdb/var/www/html/dummy-4.5.37/typo3conf/ext/phpunit/Classes/BackEnd/Module.php(593): 
Tx_Phpunit_BackEnd_Module->runAllTests(Object(PHPUnit_Framework_TestSuite), 
Object(PHPUnit_Framework_TestResult))
#20 
/home/.sdb/var/www/html/dummy-4.5.37/typo3conf/ext/phpunit/Classes/BackEnd/Module.php(288): 
Tx_Phpunit_BackEnd_Module->renderRunningTest()
#21 
/home/.sdb/var/www/html/dummy-4.5.37/typo3conf/ext/phpunit/Classes/BackEnd/Module.php(206): 
Tx_Phpunit_BackEnd_Module->renderRunTests()
#22 
/home/.sdb/var/www/html/dummy-4.5.37/typo3conf/ext/phpunit/Classes/BackEnd/index.php(86): 
Tx_Phpunit_BackEnd_Module->main()
#23 /opt/typo3_src-4.5.37/typo3/mod.php(51): require('/home/.sdb/var/...')
#24 {main}

Please advise me about any ideas how to handle this error.

Best regards,
Christian


More information about the TYPO3-english mailing list