You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/09/16 02:31:50 UTC

[GitHub] [hudi] xushiyan commented on a diff in pull request #6652: [HUDI-4830] Fix testNoGlobalConfFileConfigured when add hudi-defaults.conf in default dir

xushiyan commented on code in PR #6652:
URL: https://github.com/apache/hudi/pull/6652#discussion_r972557066


##########
hudi-common/src/test/java/org/apache/hudi/common/util/TestDFSPropertiesConfiguration.java:
##########
@@ -173,7 +173,9 @@ public void testNoGlobalConfFileConfigured() {
     ENVIRONMENT_VARIABLES.clear(DFSPropertiesConfiguration.CONF_FILE_DIR_ENV_NAME);
     // Should not throw any exception when no external configuration file configured
     DFSPropertiesConfiguration.refreshGlobalProps();
-    assertEquals(0, DFSPropertiesConfiguration.getGlobalProps().size());
+    DFSPropertiesConfiguration defaultDfsPropertiesConfiguration = new DFSPropertiesConfiguration();
+    defaultDfsPropertiesConfiguration.addPropsFromFile(DFSPropertiesConfiguration.DEFAULT_PATH);
+    assertEquals(defaultDfsPropertiesConfiguration.getProps().size(), DFSPropertiesConfiguration.getGlobalProps().size());

Review Comment:
   let's not create DFSPropertiesConfiguration again to generate the expected value. we should just load the default hudi-defaults.conf with plain java properties and get the count as the expected size. 



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org