jinmeiliao commented on a change in pull request #7116:
URL: https://github.com/apache/geode/pull/7116#discussion_r758686891



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/security/SecurityServiceFactory.java
##########
@@ -49,8 +53,21 @@ public static SecurityService create(Properties 
securityProps, CacheConfig cache
     return create(securityProps, cacheConfig.getSecurityManager(), 
cacheConfig.getPostProcessor());
   }
 
+  private static SecurityService getTestSecurityService() {
+    String securityServiceClassName = 
System.getProperty(TEST_SECURITY_SERVICE_SYSTEM_PROPERTY);
+    if (securityServiceClassName == null) {
+      return null;
+    }
+    return CallbackInstantiator.getObjectOfType(securityServiceClassName, 
SecurityService.class);
+  }
+
   public static SecurityService create(Properties securityProps,
       SecurityManager preferredSecurityManager, PostProcessor 
preferredPostProcessor) {
+    SecurityService testSecurityService = getTestSecurityService();
+    if (testSecurityService != null) {
+      return testSecurityService;

Review comment:
       The alternative is that now that we have confirmed that by turning the 
`UnavailableSecurityManagerException` in the security service into 
`CacheClosedException` will cause the client to retry other servers, we can get 
rid of the dunit test and simply use a junit test to make sure the conversion 
of the exceptions.




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