codope commented on code in PR #9335:
URL: https://github.com/apache/hudi/pull/9335#discussion_r1280764110
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/testutils/HoodieClientTestBase.java:
##########
@@ -172,6 +172,10 @@ public HoodieWriteConfig.Builder getConfigBuilder(String
schemaStr, IndexType in
.withEnableBackupForRemoteFileSystemView(false) // Fail test if
problem connecting to timeline-server
.withRemoteServerPort(timelineServicePort)
.withStorageType(FileSystemViewStorageType.EMBEDDED_KV_STORE).build());
+ if (schemaStr != null) {
Review Comment:
Use StringUtils.nonEmpty?
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/functional/TestHoodieClientOnCopyOnWriteStorage.java:
##########
@@ -404,6 +406,38 @@ public void testPreCommitValidationWithMultipleInflights()
throws Exception {
assertTrue(testTable.commitExists(instant2));
}
+ @Test
+ public void testInertsWithEmptyCommitsHavingWriterSchemaAsNull() throws
Exception {
+ // Set autoCommit false
+ HoodieWriteConfig.Builder cfgBuilder =
getConfigBuilder().withAutoCommit(false);
+ addConfigsForPopulateMetaFields(cfgBuilder, true);
+ SparkRDDWriteClient client = getHoodieWriteClient(cfgBuilder.build());
Review Comment:
Get the client in try-with-resource block, or close the client in finally
block.
--
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]