From: Tymoteusz Motylewski Date: Thu, 12 Jun 2014 14:02:20 +0000 (+0200) Subject: [BUGFIX] Make Functional tests work on fast machines X-Git-Tag: 6.2.4~117 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/cbd8a3949b9c91bf769791e8af8feaeb31f79ee7?ds=sidebyside [BUGFIX] Make Functional tests work on fast machines Adds more entropy to the uniqid() call. So each call inside foreach loop will generate unique value. As uniqid() generates values based on current time, subsequent calls may return the same value on a fast machine. On Windows it's even worse, as uniqid() has single-second-resolution out of the box. Resolves: #59529 Relates: #58602 Releases: 6.3, 6,2 Change-Id: I7476f85961e906905acaca7fd816e37375c9817c Reviewed-on: https://review.typo3.org/30696 Reviewed-by: Marc Bastian Heinrichs Tested-by: Marc Bastian Heinrichs Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn (cherry picked from commit 86c63e3be8888b1a065d0585bb4c94ff1498336b) Reviewed-on: https://review.typo3.org/30914 --- diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Framework/ActionService.php b/typo3/sysext/core/Tests/Functional/DataHandling/Framework/ActionService.php index 2e016eb962e4..264cd5840188 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Framework/ActionService.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Framework/ActionService.php @@ -69,7 +69,7 @@ class ActionService { if (!isset($recordData['pid'])) { $recordData['pid'] = $pageId; } - $currentUid = uniqid('NEW'); + $currentUid = uniqid('NEW', TRUE); $newTableIds[$tableName][] = $currentUid; $dataMap[$tableName][$currentUid] = $recordData; if ($previousTableName !== NULL && $previousUid !== NULL) {