Skip to content

Commit 98bdd0c

Browse files
author
Mohan Ahuja
committed
ACP2E-726: Unable to query bulk operations by search criteria using REST Api
- Fixed static test failures - Fixed integration test failures
1 parent 8ce8f27 commit 98bdd0c

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,22 @@ public function testExecute(): void
5353
$startedAt = $resource->getConnection()->formatDate(new \DateTime('-14 hours', new \DateTimeZone('UTC')));
5454
$operationsData = [
5555
[
56-
OperationInterface::ID => 0,
56+
OperationInterface::OPERATION_KEY => 0,
5757
OperationInterface::STATUS => OperationInterface::STATUS_TYPE_COMPLETE,
5858
'started_at' => $startedAt,
5959
],
6060
[
61-
OperationInterface::ID => 1,
61+
OperationInterface::OPERATION_KEY => 1,
6262
OperationInterface::STATUS => OperationInterface::STATUS_TYPE_OPEN,
6363
'started_at' => $startedAt,
6464
],
6565
[
66-
OperationInterface::ID => 2,
66+
OperationInterface::OPERATION_KEY => 2,
6767
OperationInterface::STATUS => OperationInterface::STATUS_TYPE_NOT_RETRIABLY_FAILED,
6868
'started_at' => $startedAt,
6969
],
7070
[
71-
OperationInterface::ID => 3,
71+
OperationInterface::OPERATION_KEY => 3,
7272
OperationInterface::STATUS => OperationInterface::STATUS_TYPE_OPEN,
7373
'started_at' => null,
7474
]

dev/tests/integration/testsuite/Magento/AsynchronousOperations/Model/OperationManagementTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function testGetBulkStatus()
7474
$select = $connection->select()
7575
->from($table)
7676
->where("bulk_uuid = ?", 'bulk-uuid-5')
77-
->where("operation_key = ?", $operationId);
77+
->where("id = ?", $operationId);
7878
$updatedOperation = $connection->fetchRow($select);
7979

8080
$this->assertEquals(OperationInterface::STATUS_TYPE_OPEN, $updatedOperation['status']);

lib/internal/Magento/Framework/Bulk/OperationInterface.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ interface OperationInterface extends \Magento\Framework\Api\ExtensibleDataInterf
1515
/**#@+
1616
* Constants for keys of data array. Identical to the name of the getter in snake case
1717
*/
18-
const ID = 'id';
19-
const BULK_ID = 'bulk_uuid';
20-
const TOPIC_NAME = 'topic_name';
21-
const SERIALIZED_DATA = 'serialized_data';
22-
const RESULT_SERIALIZED_DATA = 'result_serialized_data';
23-
const OPERATION_KEY = 'operation_key';
24-
const STATUS = 'status';
25-
const RESULT_MESSAGE = 'result_message';
26-
const ERROR_CODE = 'error_code';
18+
public const ID = 'id';
19+
public const BULK_ID = 'bulk_uuid';
20+
public const TOPIC_NAME = 'topic_name';
21+
public const SERIALIZED_DATA = 'serialized_data';
22+
public const RESULT_SERIALIZED_DATA = 'result_serialized_data';
23+
public const OPERATION_KEY = 'operation_key';
24+
public const STATUS = 'status';
25+
public const RESULT_MESSAGE = 'result_message';
26+
public const ERROR_CODE = 'error_code';
2727
/**#@-*/
2828

2929
/**#@+
3030
* Status types
3131
*/
32-
const STATUS_TYPE_COMPLETE = 1;
33-
const STATUS_TYPE_RETRIABLY_FAILED = 2;
34-
const STATUS_TYPE_NOT_RETRIABLY_FAILED = 3;
35-
const STATUS_TYPE_OPEN = 4;
36-
const STATUS_TYPE_REJECTED = 5;
32+
public const STATUS_TYPE_COMPLETE = 1;
33+
public const STATUS_TYPE_RETRIABLY_FAILED = 2;
34+
public const STATUS_TYPE_NOT_RETRIABLY_FAILED = 3;
35+
public const STATUS_TYPE_OPEN = 4;
36+
public const STATUS_TYPE_REJECTED = 5;
3737
/**#@-*/
3838

3939
/**

0 commit comments

Comments
 (0)