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



##########
File path: 
geode-core/src/distributedTest/java/org/apache/geode/management/internal/security/MultiUserAuthenticationDUnitTest.java
##########
@@ -100,4 +113,67 @@ public void multiAuthenticatedView() throws Exception {
       cache.close();
     }
   }
+
+  @Test
+  public void multiUserCQ() throws Exception {
+    int locatorPort = locator.getPort();
+    ClientCache cache = client.withCacheSetup(f -> 
f.setPoolSubscriptionEnabled(true)
+        .setPoolMultiuserAuthentication(true)
+        .addPoolLocator("localhost", locatorPort))
+        .createCache();
+
+    // both are able to read data
+    RegionService regionService1 = client.createAuthenticatedView("data", 
"data");
+    RegionService regionService2 = client.createAuthenticatedView("dataRead", 
"dataRead");
+
+    EventsCqListner listener1 = 
createAndExecuteCQ(regionService1.getQueryService(), "cq1",
+        "select * from /region r where r.length<=2");
+    EventsCqListner listener2 = 
createAndExecuteCQ(regionService2.getQueryService(), "cq2",
+        "select * from /region r where r.length>=2");
+
+    // put 4 data in the region
+    gfsh.executeAndAssertThat("put --region=region --key=1 --value=1");
+    gfsh.executeAndAssertThat("put --region=region --key=11 --value=11");
+    gfsh.executeAndAssertThat("put --region=region --key=111 --value=111");
+
+    await().atMost(100, TimeUnit.SECONDS).untilAsserted(

Review comment:
       done




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