Skip to content

Commit e4636d2

Browse files
committed
ACPT-99: Import API Parallelization
1 parent f6a1b2f commit e4636d2

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/Type/OptionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,12 @@ protected function _getSourceDataMocks(bool $addExpectations, bool $doubleOption
409409
{
410410
$csvData = $this->_loadCsvFile();
411411

412-
$dataSourceModel = $this->getMockBuilder(\stdClass::class)->addMethods(['getNextBunch'])
412+
$dataSourceModel = $this->getMockBuilder(\stdClass::class)->addMethods(['getNextUniqueBunch'])
413413
->disableOriginalConstructor()
414414
->getMock();
415415
if ($addExpectations) {
416416
$dataSourceModel
417-
->method('getNextBunch')
417+
->method('getNextUniqueBunch')
418418
->willReturnOnConsecutiveCalls($csvData['data'], null);
419419
}
420420

@@ -1039,11 +1039,11 @@ public function validateAmbiguousDataDataProvider(): array
10391039
*/
10401040
public function testParseRequiredData(): void
10411041
{
1042-
$modelData = $this->getMockBuilder(\stdClass::class)->addMethods(['getNextBunch'])
1042+
$modelData = $this->getMockBuilder(\stdClass::class)->addMethods(['getNextUniqueBunch'])
10431043
->disableOriginalConstructor()
10441044
->getMock();
10451045
$modelData
1046-
->method('getNextBunch')
1046+
->method('getNextUniqueBunch')
10471047
->willReturnOnConsecutiveCalls(
10481048
[
10491049
[

app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,12 @@ public function getIds()
910910
return $this->ids;
911911
}
912912

913+
/**
914+
* Set Ids of Validated Rows
915+
*
916+
* @param $ids
917+
* @return void
918+
*/
913919
public function setIds($ids)
914920
{
915921
$this->ids = $ids;

app/code/Magento/ImportExport/Model/ResourceModel/Import/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public function getNextBunch()
229229
$dataRow = null;
230230
if ($this->_iterator->valid()) {
231231
$encodedData = $this->_iterator->current();
232-
if (array_key_exists(0, $encodedData) && $encodedData[0]) {
232+
if (!empty($encodedData[0])) {
233233
$dataRow = $this->jsonHelper->jsonDecode($encodedData[0]);
234234
$this->_iterator->next();
235235
}

0 commit comments

Comments
 (0)