danny0405 commented on code in PR #13229:
URL: https://github.com/apache/hudi/pull/13229#discussion_r2084428098
##########
hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/table/action/rollback/TestMergeOnReadRollbackActionExecutor.java:
##########
@@ -110,52 +111,57 @@ public void testMergeOnReadRollbackActionExecutor(boolean
isUsingMarkers) throws
assertEquals(1, secondPartitionCommit2LogFiles.size());
HoodieTable table = this.getHoodieTable(metaClient, cfg);
- //2. rollback
- HoodieInstant rollBackInstant =
INSTANT_GENERATOR.createNewInstant(isUsingMarkers ?
HoodieInstant.State.INFLIGHT : HoodieInstant.State.COMPLETED,
- HoodieTimeline.DELTA_COMMIT_ACTION, "002");
- BaseRollbackPlanActionExecutor mergeOnReadRollbackPlanActionExecutor =
- new BaseRollbackPlanActionExecutor(context, cfg, table, "003",
rollBackInstant, false,
- cfg.shouldRollbackUsingMarkers(), false);
- mergeOnReadRollbackPlanActionExecutor.execute().get();
- MergeOnReadRollbackActionExecutor mergeOnReadRollbackActionExecutor = new
MergeOnReadRollbackActionExecutor(
- context,
- cfg,
- table,
- "003",
- rollBackInstant,
- true,
- false);
- //3. assert the rollback stat
- Map<String, HoodieRollbackPartitionMetadata> rollbackMetadata =
mergeOnReadRollbackActionExecutor.execute().getPartitionMetadata();
- assertEquals(2, rollbackMetadata.size());
-
- for (Map.Entry<String, HoodieRollbackPartitionMetadata> entry :
rollbackMetadata.entrySet()) {
- HoodieRollbackPartitionMetadata meta = entry.getValue();
- assertEquals(0, meta.getFailedDeleteFiles().size());
- assertEquals(1, meta.getSuccessDeleteFiles().size());
+ try (SparkRDDWriteClient client = getHoodieWriteClient(cfg)) {
+ // create client so that timeline server starts
+ // Wait for embedded timeline server port to be ready
+ Thread.sleep(1000);
Review Comment:
Can you elaborate why the timeline server is needed here?
--
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]