[FOLLOWUP] Strict order in redis test for uniqid() 10/36110/4
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 19 Jan 2015 16:09:13 +0000 (17:09 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 19 Jan 2015 16:27:39 +0000 (17:27 +0100)
Follows https://review.typo3.org/#/c/35665/

Stabilize redis tests a bit with a clear order,
otherwise tests may fail sometimes.

Related: #64055
Releases: master
Change-Id: Ibc472379ea8e4c453d7c52331cb23d5cf83b4d5d
Reviewed-on: http://review.typo3.org/36110
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Tests/Unit/Cache/Backend/RedisBackendTest.php

index 0da634e..4d59e19 100644 (file)
@@ -387,10 +387,10 @@ class RedisBackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        public function setAppendsSecondIdentifierInTagToIdentifiersEntry() {
                $this->setUpBackend();
                $this->setUpRedis();
-               $firstIdentifier = $this->getUniqueId('identifier');
+               $firstIdentifier = $this->getUniqueId('identifier1-');
                $tag = 'thisTag';
                $this->backend->set($firstIdentifier, 'data', array($tag));
-               $secondIdentifier = $this->getUniqueId('identifier');
+               $secondIdentifier = $this->getUniqueId('identifier2-');
                $this->backend->set($secondIdentifier, 'data', array($tag));
                $savedTagToIdentifiersMemberArray = $this->redis->sMembers('tagIdents:' . $tag);
                sort($savedTagToIdentifiersMemberArray);
@@ -628,9 +628,9 @@ class RedisBackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        public function findIdentifiersByTagReturnsAllIdentifiersTagedWithSpecifiedTag() {
                $this->setUpBackend();
-               $firstIdentifier = $this->getUniqueId('identifier');
-               $secondIdentifier = $this->getUniqueId('identifier');
-               $thirdIdentifier = $this->getUniqueId('identifier');
+               $firstIdentifier = $this->getUniqueId('identifier1-');
+               $secondIdentifier = $this->getUniqueId('identifier2-');
+               $thirdIdentifier = $this->getUniqueId('identifier3-');
                $tagsForFirstIdentifier = array('thisTag');
                $tagsForSecondIdentifier = array('thatTag');
                $tagsForThirdIdentifier = array('thisTag', 'thatTag');