Bill commented on a change in pull request #7366:
URL: https://github.com/apache/geode/pull/7366#discussion_r839838844



##########
File path: 
geode-core/src/integrationTest/java/org/apache/geode/distributed/LocatorLauncherLocalIntegrationTest.java
##########
@@ -74,6 +77,21 @@ public void startReturnsOnline() {
     assertThat(launcher.start().getStatus()).isEqualTo(ONLINE);
   }
 
+  @Test
+  public void whenLocatorIsPresetThenItWillNotReadThePropertyFiles() {
+    launcher = givenLocatorLauncher();
+
+    assertThat(launcher.start().getStatus()).isEqualTo(ONLINE);
+    LocatorLauncher locatorLauncher = spy(launcher);
+    locatorLauncher.status();
+    /*
+     * The verification done here is that if the locator is present
+     * then we are not re-constructing the DistributedConfigImp which is
+     * triggered when we call the getProperties()

Review comment:
       Sorry to nit-pick but this comment is misleading. Calling 
`getProperteis()` doesn't trigger construction of `DistributedConfigImpl`. 
Suggest something like:
   
   > We want to verify that no `DistributedConfigImpl` is constructed. But 
that's hard/impossible to mock.
   > We happen to know that in the case where 
`SSLConfigurationFactory.getSSLConfigForComponent()`
   > constructs one,  `getProperties()` is always called first. That's why 
we're asserting `getProperties()` 
   > isn't called.




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