You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ja...@apache.org on 2018/09/13 21:26:17 UTC

[geode] branch develop updated: GEODE-5700: Removed stopping cache server explicitly (#2433)

This is an automated email from the ASF dual-hosted git repository.

jasonhuynh pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 7460797  GEODE-5700: Removed stopping cache server explicitly (#2433)
7460797 is described below

commit 74607979543e7e74784633931c4aa9366c27447e
Author: Jason Huynh <hu...@gmail.com>
AuthorDate: Thu Sep 13 14:26:08 2018 -0700

    GEODE-5700: Removed stopping cache server explicitly (#2433)
    
    
      * ServerStarterRule unnecessarily shutdown the cache server
      * Cache.close should automatically shut down the cache server for us
---
 .../org/apache/geode/test/junit/rules/ServerStarterRule.java  | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/geode-dunit/src/main/java/org/apache/geode/test/junit/rules/ServerStarterRule.java b/geode-dunit/src/main/java/org/apache/geode/test/junit/rules/ServerStarterRule.java
index a37e89b..767cc0a 100644
--- a/geode-dunit/src/main/java/org/apache/geode/test/junit/rules/ServerStarterRule.java
+++ b/geode-dunit/src/main/java/org/apache/geode/test/junit/rules/ServerStarterRule.java
@@ -89,16 +89,6 @@ public class ServerStarterRule extends MemberStarterRule<ServerStarterRule> impl
 
   @Override
   public void stopMember() {
-    // stop CacheServer and then close cache -- cache.close() will stop any running CacheServers
-    if (server != null) {
-      try {
-        server.stop();
-      } catch (Exception e) {
-      } finally {
-        server = null;
-      }
-    }
-
     // make sure this cache is the one currently open. A server cache can be recreated due to
     // importing a new set of cluster configuration.
     cache = GemFireCacheImpl.getInstance();
@@ -110,6 +100,7 @@ public class ServerStarterRule extends MemberStarterRule<ServerStarterRule> impl
         cache = null;
       }
     }
+    server = null;
   }
 
   public ServerStarterRule withPDXPersistent() {