[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:
committed by
GitHub
parent
0e8461e9ab
commit
994922a159
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user