pratyakshsharma commented on a change in pull request #1050: [HUDI-368]: code 
clean up in TestAsyncCompaction class
URL: https://github.com/apache/incubator-hudi/pull/1050#discussion_r350702096
 
 

 ##########
 File path: hudi-client/src/test/java/org/apache/hudi/TestAsyncCompaction.java
 ##########
 @@ -106,17 +105,15 @@ public void testRollbackForInflightCompaction() throws 
Exception {
 
       HoodieInstant pendingCompactionInstant =
           
metaClient.getActiveTimeline().filterPendingCompactionTimeline().firstInstant().get();
-      assertTrue("Pending Compaction instant has expected instant time",
-          
pendingCompactionInstant.getTimestamp().equals(compactionInstantTime));
-      assertTrue("Pending Compaction instant has expected state",
-          pendingCompactionInstant.getState().equals(State.REQUESTED));
+      assertEquals("Pending Compaction instant has expected instant time", 
pendingCompactionInstant.getTimestamp(),
+          compactionInstantTime);
+      assertEquals("Pending Compaction instant has expected state", 
pendingCompactionInstant.getState(), State.REQUESTED);
 
       moveCompactionFromRequestedToInflight(compactionInstantTime, client, 
cfg);
 
       // Reload and rollback inflight compaction
       metaClient = new HoodieTableMetaClient(jsc.hadoopConfiguration(), 
cfg.getBasePath());
       HoodieTable hoodieTable = HoodieTable.getHoodieTable(metaClient, cfg, 
jsc);
-      hoodieTable.rollback(jsc, compactionInstantTime, false);
 
 Review comment:
   this call is redundant, hoodieTable.rollback(jsc, compactionInstantTime, 
false) gets called as the first line of code in 
client.rollbackInflightCompaction(
             new HoodieInstant(State.INFLIGHT, 
HoodieTimeline.COMPACTION_ACTION, compactionInstantTime), hoodieTable);

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to