Skip to content

Commit 2769d2e

Browse files
committed
MC-5926: Conflict of simultaneous write in Redis cache
- fix unit test
1 parent b91f3fe commit 2769d2e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

app/code/Magento/Deploy/Model/Filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ public function lockStaticResources()
348348
*/
349349
private function reinitCacheDirectories()
350350
{
351-
$command = $this->functionCallPath . 'cache:flush';
351+
$command = $this->functionCallPath . 'cache:flush ';
352352
$this->shell->execute($command);
353353
}
354354
}

app/code/Magento/Deploy/Test/Unit/Model/FilesystemTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,18 @@ public function testRegenerateStatic()
126126
->method('execute')
127127
->with($setupDiCompileCmd);
128128

129+
130+
$setupDiCompileCmd = $this->cmdPrefix . 'cache:flush ';
131+
$this->shell->expects(self::at(2))
132+
->method('execute')
133+
->with($setupDiCompileCmd);
134+
129135
$this->initAdminLocaleMock('en_US');
130136

131137
$usedLocales = ['fr_FR', 'de_DE', 'nl_NL', 'en_US'];
132138
$staticContentDeployCmd = $this->cmdPrefix . 'setup:static-content:deploy -f '
133139
. implode(' ', $usedLocales);
134-
$this->shell->expects(self::at(2))
140+
$this->shell->expects(self::at(3))
135141
->method('execute')
136142
->with($staticContentDeployCmd);
137143

0 commit comments

Comments
 (0)