Bug #11621

Fatal error in ObjectManagerTest

Added by Bastian Waidelich over 4 years ago. Updated over 4 years ago.

Status:Resolved Start date:2010-12-21
Priority:Should have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:- Testing -
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 14
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

When running the FLOW3 testrunner, in about 20% of the cases I'm getting a fatal error "Cannot redeclare class [XYZ]" where [XYZ] is a mock class name like "BarClass4d107922cd5f8".
The reason is probably, that we're using uniqid() to create the class names, which seems - at least on windows - not to be as unique as it should be..

Associated revisions

Revision 68d21a4a
Added by Bastian Waidelich over 4 years ago

[+BUGFIX] FLOW3 (Testing): Use better uniqid() in ObjectManagerTest

On Windows successive calls of the PHP function uniqid() seem to create the
same string in certain circumstances.
In the ObjectManagerTest we use uniqid() to create mock class names.
This leads to a fatal error in about every fifth execution of the testrunner on
my machine.
This is fixed by specifying the "more_entropy" parameter and prefixing the
id with a random number.

Change-Id: I8bd2dae04ed084eed134b18969a9eac6e4122426
Fixes: #11621

History

#1 Updated by Karsten Dambekalns over 4 years ago

  • Status changed from New to Under Review
  • Assigned To set to Bastian Waidelich
  • Target version set to 1.0 alpha 14

#2 Updated by Bastian Waidelich over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF