[ 
https://issues.apache.org/jira/browse/GEODE-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16253928#comment-16253928
 ] 

ASF GitHub Bot commented on GEODE-3935:
---------------------------------------

nabarunnag closed pull request #1000: GEODE-3935: Closing down the cache after 
each test.
URL: https://github.com/apache/geode/pull/1000
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/geode-core/src/test/java/org/apache/geode/security/query/QuerySecurityBase.java
 
b/geode-core/src/test/java/org/apache/geode/security/query/QuerySecurityBase.java
index 3e71817289..3cbbb1e844 100644
--- 
a/geode-core/src/test/java/org/apache/geode/security/query/QuerySecurityBase.java
+++ 
b/geode-core/src/test/java/org/apache/geode/security/query/QuerySecurityBase.java
@@ -20,7 +20,6 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 
@@ -39,6 +38,7 @@
 import org.apache.geode.cache.query.QueryInvocationTargetException;
 import org.apache.geode.cache.query.QueryService;
 import org.apache.geode.cache.query.TypeMismatchException;
+import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.security.SecurityTestUtil;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.Host;
@@ -81,6 +81,12 @@ public void configureTest() {
     createProxyRegion(superUserClient, regionName);
   }
 
+  public void closeAnyPollutedCache() {
+    if (GemFireCacheImpl.getInstance() != null) {
+      GemFireCacheImpl.getInstance().close();
+    }
+  }
+
   public void setClientCache(ClientCache cache) {
     clientCache = cache;
   }
@@ -91,6 +97,7 @@ public ClientCache getClientCache() {
 
   public void createClientCache(VM vm, String userName, String password) {
     vm.invoke(() -> {
+      closeAnyPollutedCache();
       ClientCache cache = SecurityTestUtil.createClientCache(userName, 
password, server.getPort());
       setClientCache(cache);
     });
diff --git 
a/geode-cq/src/test/java/org/apache/geode/cache/query/cq/dunit/CqSecurityAuthorizedUserDUnitTest.java
 
b/geode-cq/src/test/java/org/apache/geode/cache/query/cq/dunit/CqSecurityAuthorizedUserDUnitTest.java
index 298a273b51..d71bb1e748 100644
--- 
a/geode-cq/src/test/java/org/apache/geode/cache/query/cq/dunit/CqSecurityAuthorizedUserDUnitTest.java
+++ 
b/geode-cq/src/test/java/org/apache/geode/cache/query/cq/dunit/CqSecurityAuthorizedUserDUnitTest.java
@@ -17,12 +17,9 @@
 import static org.apache.geode.internal.Assert.assertTrue;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
 
-import java.util.List;
 import java.util.concurrent.TimeUnit;
 
-import junitparams.Parameters;
 import org.awaitility.Awaitility;
 import org.junit.Before;
 import org.junit.Test;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Failure from CqSecurityAuthorizedUserDUnitTest
> ----------------------------------------------
>
>                 Key: GEODE-3935
>                 URL: https://issues.apache.org/jira/browse/GEODE-3935
>             Project: Geode
>          Issue Type: Bug
>          Components: cq
>            Reporter: Dan Smith
>
> We saw this in an internal CI run from develop with revision 
> e630cd3ad93f84a14819308d7a97d9bb9fb7197f
> {noformat}
> :geode-cq:distributedTest
> org.apache.geode.cache.query.cq.dunit.CqSecurityAuthorizedUserDUnitTest > 
> cqExecuteWithInitialResultsWithMethodInvocationWithUsersWithCqPermissionsWithPrepopulatedRegionShouldBeDeniedBecauseOfInvocation[0]
>  FAILED
>     org.apache.geode.test.dunit.RMIException: While invoking 
> org.apache.geode.security.query.QuerySecurityBase$$Lambda$324/1598682259.run 
> in VM 1 running on Host a248aa0818f9 with 4 VMs
>         Caused by:
>         java.lang.IllegalStateException: Existing cache's default pool was 
> not compatible
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to