rkirtir commented on code in PR #4384:
URL: https://github.com/apache/hive/pull/4384#discussion_r1217874533


##########
ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java:
##########
@@ -3496,13 +3497,15 @@ public void testAbortCompaction() throws Exception {
     // Verify  compaction order
     List<ShowCompactResponseElement> compacts =
             txnHandler.showCompact(new ShowCompactRequest()).getCompacts();
+    compacts.sort(Comparator.comparingLong(ShowCompactResponseElement::getId));
+    
     Assert.assertEquals(6, compacts.size());
-    Assert.assertEquals(TxnStore.INITIATED_RESPONSE, 
compacts.get(0).getState());
-    Assert.assertEquals(TxnStore.REFUSED_RESPONSE, compacts.get(1).getState());
+    Assert.assertEquals(TxnStore.REFUSED_RESPONSE, compacts.get(0).getState());
+    Assert.assertEquals(TxnStore.SUCCEEDED_RESPONSE, 
compacts.get(1).getState());
     Assert.assertEquals(TxnStore.CLEANING_RESPONSE, 
compacts.get(2).getState());
     Assert.assertEquals(TxnStore.CLEANING_RESPONSE, 
compacts.get(3).getState());
-    Assert.assertEquals(TxnStore.SUCCEEDED_RESPONSE, 
compacts.get(4).getState());
-    Assert.assertEquals(TxnStore.REFUSED_RESPONSE, compacts.get(5).getState());
+    Assert.assertEquals(TxnStore.REFUSED_RESPONSE, compacts.get(4).getState());
+    Assert.assertEquals(TxnStore.INITIATED_RESPONSE, 
compacts.get(5).getState());

Review Comment:
   Seems default sorting order of show compaction has compromised



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to