gtully commented on code in PR #4011:
URL: https://github.com/apache/activemq-artemis/pull/4011#discussion_r842674425


##########
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java:
##########
@@ -708,6 +720,149 @@ public void testValuePostFixModifier() throws Throwable {
       Assert.assertEquals(25 * 1024, configuration.getGlobalMaxSize());
    }
 
+   @Test
+   public void testSystemPropValueReplaced() throws Exception {
+      ConfigurationImpl configuration = new ConfigurationImpl();
+      Properties properties = new Properties();
+      final String homeFromDefault = "default-home";
+      final String homeFromEnv = System.getenv("HOME");
+      properties.put("name", "${HOME:" + homeFromDefault + "}");
+      configuration.parsePrefixedProperties(properties, null);
+      if (homeFromEnv != null) {
+         Assert.assertEquals(homeFromEnv, configuration.getName());
+      } else {

Review Comment:
   true, but it also exercise the default value in that case.



-- 
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]

Reply via email to