From cb2e5e9c66db2f8f9b58bf5443dbdd3ba3daa910 Mon Sep 17 00:00:00 2001 From: Pahansith Gunathilake Date: Wed, 2 Mar 2022 09:10:39 +0530 Subject: [PATCH] Fix test failure --- .../core/operation/mgt/dao/impl/GenericOperationDAOImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java index f6f7e4b0cc..24e565f2d7 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java @@ -425,7 +425,8 @@ public class GenericOperationDAOImpl implements OperationDAO { " LEFT JOIN " + " DM_DEVICE_OPERATION_RESPONSE opr ON opr.EN_OP_MAP_ID = eom.ID " + "WHERE " + - " eom.OPERATION_ID = ? AND eom.TENANT_ID = ?"; + " eom.OPERATION_ID = ? AND eom.TENANT_ID = ? " + + "ORDER BY eom.UPDATED_TIMESTAMP DESC"; stmt = conn.prepareStatement(sql); stmt.setInt(1, operationId);