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



##########
File path: 
geode-cq/src/distributedTest/java/org/apache/geode/security/MultiUserAPIDUnitTest.java
##########
@@ -226,12 +231,38 @@ public void jsonFormatterOnTheClientWithSingleUser() 
throws Exception {
     region.put("key", value);
 
     // make sure the client only needs to authenticate once
-    
assertThat(TrackableUserPasswordAuthInit.timeInitialized.get()).isEqualTo(1);
+    assertThat(CountableUserPasswordAuthInit.count.get()).isEqualTo(1);
   }
 
+  @Rule
+  public ExecutorServiceRule executor = new ExecutorServiceRule();
+
+  @Test
+  public void multiUser_OneUserShouldOnlyAuthenticateOnceByDifferentThread() 
throws Exception {
+    ClientCache cache = client.withServerConnection(server.getPort())
+        .withProperty(SECURITY_CLIENT_AUTH_INIT, 
CountableUserPasswordAuthInit.class.getName())
+        .withMultiUser(true)
+        .createCache();
+    Properties properties = new Properties();
+    properties.setProperty(UserPasswordAuthInit.USER_NAME, "data");
+    properties.setProperty(UserPasswordAuthInit.PASSWORD, "data");
+    RegionService regionService = cache.createAuthenticatedView(properties);
+
+    
cache.createClientRegionFactory(ClientRegionShortcut.PROXY).create("region");
+    Region region = regionService.getRegion(SEPARATOR + "region");

Review comment:
       removed




-- 
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: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to