jinmeiliao commented on a change in pull request #7116:
URL: https://github.com/apache/geode/pull/7116#discussion_r758673228
##########
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:
it's create a `SecurityManager`, it's to create a `SecurityService`, the
test securityService is a child of the usual security service, only to override
one method to throw an exception at intervals.
--
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]