jerryshao commented on code in PR #4005:
URL: https://github.com/apache/gravitino/pull/4005#discussion_r1686479467
##########
core/src/test/java/org/apache/gravitino/auxiliary/TestAuxiliaryServiceManager.java:
##########
@@ -88,4 +110,36 @@ public void testGravitinoAuxServiceManager() throws
Exception {
verify(auxService, times(1)).serviceStop();
verify(auxService2, times(1)).serviceStop();
}
+
+ @Test
+ void testAuxiliaryServiceConfigs() {
+ Map<String, String> m =
+ ImmutableMap.of(
+ AuxiliaryServiceManager.GRAVITINO_AUX_SERVICE_PREFIX
+ + AuxiliaryServiceManager.AUX_SERVICE_NAMES,
+ "a,b",
+ "gravitino.a.test1",
+ "test1",
+ AuxiliaryServiceManager.GRAVITINO_AUX_SERVICE_PREFIX + "a.test4",
+ "test4",
+ "gravitino.b.test2",
+ "test2",
+ "gravitino.aa.test3",
+ "test3");
+ DummyConfig config = new DummyConfig();
+ config.loadFromMap(m, k -> true);
+ Map<String, String> serviceConfigs =
+ AuxiliaryServiceManager.extractAuxiliaryServiceConfigs(config);
+ Assertions.assertEquals(
+ ImmutableMap.of(
+ AuxiliaryServiceManager.AUX_SERVICE_NAMES,
+ "a,b",
+ "a.test1",
+ "test1",
+ "a.test4",
+ "test4",
+ "b.test2",
+ "test2"),
+ serviceConfigs);
Review Comment:
If old and new configs are both set, who will take precedence, who will
overwrite who? I think you need to clarify this behavior and add UT to cover
this scenario.
--
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]