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

Christian Stüdemann typo3.v01 at christian-stuedemann.de
Fri Dec 5 14:46:50 CET 2014


Am 04.12.2014 um 19:04 schrieb Christian Stüdemann:
> Dear community,
>
> I found (but didn't solve yet) the part of the source code that leads to
> this error: PHPUnit_Framework_TestCase::runBare() calls
> PHPUnit_Util_GlobalState::backupGlobals() before testing and
> PHPUnit_Util_GlobalState::restoreGlobals() afterwards. The restore does
> not restore the DB link resource of GLOBALS['TYPO3_DB'] correctly, which
> leads to a broken DB connection after the test.
>
> Solutions can be (not proved yet):
> a) avoid the problem by running inIsolation=TRUE or
> runTestInSeparateProcess=TRUE or by setting backupGlobals=FALSE.
> b) create a new DB connection before running the next test
> c) check/correct the backup/restore methods
>
> c) would be greatest, but is a change in the core system.
> a) and b) are changes within config / own test code with unknown
> effects. Need to test this.
>
> Is this known as a bug already?
>
> Best regards,
> Christian


Here http://forum.typo3.org/index.php/t/140961/ is the solution: Simply 
add "TYPO3_DB" to the backup/restore black list. (Nevertheless IMHO it 
should be handled by the GlobalState utility automatically)


More information about the TYPO3-english mailing list