1
0

[HUDI-400] Check upgrade from old plan to new plan for compaction (#1422)

* Fix NPE when DataFile is null
* Check from old plan upgrade to new plan
This commit is contained in:
Zhiyuan Zhao
2020-03-20 15:13:17 +08:00
committed by GitHub
parent a752b7b18c
commit 14e0c95206
2 changed files with 3 additions and 1 deletions

View File

@@ -84,6 +84,8 @@ public class TestCompactionUtils extends HoodieCommonTestHarness {
HoodieCompactionPlan newPlan = migrator.upgradeToLatest(plan, plan.getVersion());
Assert.assertEquals(LATEST_COMPACTION_METADATA_VERSION, newPlan.getVersion());
testFileSlicesCompactionPlanEquality(inputAndPlan.getKey(), newPlan);
HoodieCompactionPlan latestPlan = migrator.migrateToVersion(oldPlan, oldPlan.getVersion(), newPlan.getVersion());
testFileSlicesCompactionPlanEquality(inputAndPlan.getKey(), latestPlan);
}
@Test