1
0

[HUDI-2472] Enabling metadata table in TestHoodieIndex and TestMergeOnReadRollbackActionExecutor (#3978)

- With rollback after first commit support added to metadata table, these test cases are safe to have metadata table turned on.
This commit is contained in:
Manoj Govindassamy
2021-11-13 16:37:30 -08:00
committed by GitHub
parent 0e8461e9ab
commit 994922a159
2 changed files with 4 additions and 3 deletions

View File

@@ -225,7 +225,7 @@ public class TestHoodieIndex extends HoodieClientTestHarness {
@ParameterizedTest
@MethodSource("indexTypeParams")
public void testSimpleTagLocationAndUpdateWithRollback(IndexType indexType, boolean populateMetaFields) throws Exception {
setUp(indexType, populateMetaFields, false);
setUp(indexType, populateMetaFields, true);
String newCommitTime = writeClient.startCommit();
int totalRecords = 20 + random.nextInt(20);
List<HoodieRecord> records = dataGen.generateInserts(newCommitTime, totalRecords);

View File

@@ -155,12 +155,13 @@ public class TestMergeOnReadRollbackActionExecutor extends HoodieClientRollbackT
}
/**
* Test Cases for rollbacking when has not base file.
* Test Cases for rolling back when there is no base file.
*/
@Test
public void testRollbackWhenFirstCommitFail() throws Exception {
HoodieWriteConfig config = HoodieWriteConfig.newBuilder().withPath(basePath).withMetadataConfig(HoodieMetadataConfig.newBuilder().enable(false).build()).build();
HoodieWriteConfig config = HoodieWriteConfig.newBuilder()
.withPath(basePath).withMetadataConfig(HoodieMetadataConfig.newBuilder().enable(true).build()).build();
try (SparkRDDWriteClient client = getHoodieWriteClient(config)) {
client.startCommitWithTime("001");