Skip to content

Commit 2f57681

Browse files
author
Mohan Ahuja
committed
ACP2E-726: Unable to query bulk operations by search criteria using REST Api
- Fixing static and integration test failures
1 parent 84c9730 commit 2f57681

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

app/code/Magento/AsynchronousOperations/Test/Unit/Model/OperationRepositoryTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ class OperationRepositoryTest extends TestCase
6868
private $logger;
6969

7070
/**
71-
* private $item
71+
* @var array of items
7272
*/
73-
private array $items = [
73+
private $items = [
7474
"items"=> [
7575
[
7676
"extension_attributes" => [
@@ -79,7 +79,7 @@ class OperationRepositoryTest extends TestCase
7979
"id" => 1,
8080
"bulk_uuid" => "89300764-2502-44c6-a377-70b9565c34b8",
8181
"topic_name" => "async.magento.customer.api.accountmanagementinterface.createaccount.post",
82-
"serialized_data" => "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"mshaw@example.com\\\",\\\"firstname\\\":\\\"Melanie Shaw\\\",\\\"lastname\\\":\\\"Doe\\\"},\\\"password\\\":\\\"Strong-Password\\\"}\"}",
82+
"serialized_data" => "{}",
8383
"result_serialized_data" => null,
8484
"status"=> 4,
8585
"result_message" => null,
@@ -92,7 +92,7 @@ class OperationRepositoryTest extends TestCase
9292
"id" => 2,
9393
"bulk_uuid" => "89300764-2502-44c6-a377-70b9565c34b8",
9494
"topic_name" => "async.magento.customer.api.accountmanagementinterface.createaccount.post",
95-
"serialized_data" => "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"bmartin@example.com\\\",\\\"firstname\\\":\\\"Bryce\\\",\\\"lastname\\\":\\\"Martin\\\"},\\\"password\\\":\\\"Strong-Password\\\"}\"}",
95+
"serialized_data" => "{}",
9696
"result_serialized_data" => null,
9797
"status" => 4,
9898
"result_message" => null,
@@ -105,7 +105,7 @@ class OperationRepositoryTest extends TestCase
105105
"id" => 3,
106106
"bulk_uuid" => "89300764-2502-44c6-a377-70b9565c34b8",
107107
"topic_name" => "async.magento.customer.api.accountmanagementinterface.createaccount.post",
108-
"serialized_data" => "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"bmartin@example.com\\\",\\\"firstname\\\":\\\"Bryce\\\",\\\"lastname\\\":\\\"Martin\\\"},\\\"password\\\":\\\"Strong-Password\\\"}\"}",
108+
"serialized_data" => "{}",
109109
"result_serialized_data" => null,
110110
"status" => 4,
111111
"result_message" => null,
@@ -118,7 +118,7 @@ class OperationRepositoryTest extends TestCase
118118
"id" => 4,
119119
"bulk_uuid" => "89300764-2502-44c6-a377-70b9565c34b8",
120120
"topic_name" => "async.magento.customer.api.accountmanagementinterface.createaccount.post",
121-
"serialized_data" => "{\"entity_id\":null,\"entity_link\":\"\",\"meta_information\":\"{\\\"customer\\\":{\\\"email\\\":\\\"tgomez@example.com\\\",\\\"firstname\\\":\\\"Teresa\\\",\\\"lastname\\\":\\\"Gomez\\\"},\\\"password\\\":\\\"Strong-Password\\\"}\"}",
121+
"serialized_data" => "{}",
122122
"result_serialized_data" => null,
123123
"status" => 4,
124124
"result_message" => null,
@@ -154,7 +154,7 @@ protected function setUp(): void
154154
/**
155155
* @return void
156156
*/
157-
public function testGetFailedOperationsByBulkId(): void
157+
public function testGetListSelect(): void
158158
{
159159
$searchResultInterface = $this->createMock(OperationSearchResultsInterface::class);
160160
$searchCriteria = $this->createMock(SearchCriteriaInterface::class);

dev/tests/integration/testsuite/Magento/AsynchronousOperations/Cron/MarkIncompleteOperationsAsFailedTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function testExecute(): void
103103
);
104104
$this->assertEquals(1, $collection->count());
105105
$operation = $collection->getFirstItem();
106-
$this->assertEquals(2, $operation->getId());
106+
$this->assertEquals(1, $operation->getId());
107107
$this->assertEquals(0, $operation->getErrorCode());
108108
$this->assertEquals('Unknown Error', $operation->getResultMessage());
109109
}

0 commit comments

Comments
 (0)