File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,6 @@ public function assertImageContentIsEqual(
57
57
): void {
58
58
$ cookie = $ this ->getCookie ($ cookieName );
59
59
$ imageContent = $ this ->getCurlResponse ($ url , $ cookie , $ postBody );
60
- // Must make request twice until bug is resolved: B2B-1789
61
- $ imageContent = $ this ->getCurlResponse ($ url , $ cookie , $ postBody );
62
60
// md5() here is not for cryptographic use.
63
61
// phpcs:ignore Magento2.Security.InsecureFunction
64
62
$ imageContentMD5 = md5 ($ imageContent );
Original file line number Diff line number Diff line change @@ -216,15 +216,18 @@ public function launch(): ResponseInterface
216
216
*/
217
217
private function createLocalCopy (): void
218
218
{
219
- $ this ->syncFactory ->create (['directory ' => $ this ->directoryPub ])
220
- ->synchronize ($ this ->relativeFileName );
219
+ $ synchronizer = $ this ->syncFactory ->create (['directory ' => $ this ->directoryPub ]);
220
+ $ synchronizer ->synchronize ($ this ->relativeFileName );
221
221
222
222
if ($ this ->directoryPub ->isReadable ($ this ->relativeFileName )) {
223
223
return ;
224
224
}
225
225
226
226
if ($ this ->mediaUrlFormat === CatalogMediaConfig::HASH ) {
227
227
$ this ->imageResize ->resizeFromImageName ($ this ->getOriginalImage ($ this ->relativeFileName ));
228
+ if (!$ this ->directoryPub ->isReadable ($ this ->relativeFileName )) {
229
+ $ synchronizer ->synchronize ($ this ->relativeFileName );
230
+ }
228
231
}
229
232
}
230
233
You can’t perform that action at this time.
0 commit comments