geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [3/4] geode git commit: GEODE-2730: refactor rules
Date Thu, 13 Apr 2017 17:24:01 GMT
http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/internal/cache/control/RebalanceOperationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/control/RebalanceOperationDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/control/RebalanceOperationDUnitTest.java
index 694fc61..5f1c7fe 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/control/RebalanceOperationDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/control/RebalanceOperationDUnitTest.java
@@ -128,7 +128,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Cache cache = getCache();
         AttributesFactory attr = new AttributesFactory();
@@ -244,7 +244,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     VM vm2 = host.getVM(2);
     VM vm3 = host.getVM(3);
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Cache cache = getCache();
         AttributesFactory attr = new AttributesFactory();
@@ -289,7 +289,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     // make sure we can tell that the buckets have low redundancy
     vm0.invoke(checkLowRedundancy);
 
-    SerializableRunnable closePrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable closePrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         disconnectFromDS();
         // Cache cache = getCache();
@@ -346,7 +346,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
       VM vm0 = host.getVM(0);
       VM vm1 = host.getVM(1);
 
-      SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+      SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
         public void run() {
           Cache cache = getCache();
           AttributesFactory attr = new AttributesFactory();
@@ -467,7 +467,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
       setRedundancyZone(vm1, "A");
       final DistributedMember zoneBMember = setRedundancyZone(vm2, "B");
 
-      SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+      SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
         public void run() {
           Cache cache = getCache();
           AttributesFactory attr = new AttributesFactory();
@@ -667,7 +667,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
         }
       };
 
-      SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+      SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
         public void run() {
           ParallelRecoveryObserver ob =
               (ParallelRecoveryObserver) InternalResourceManager.getResourceObserver();
@@ -958,7 +958,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
 
   private DistributedMember createPrRegion(VM vm, final String region, final int localMaxMemory,
       final String colocatedWith) {
-    SerializableCallable createPrRegion = new SerializableCallable("withRegion") {
+    SerializableCallable createPrRegion = new SerializableCallable("createRegion") {
       public Object call() {
         Cache cache = getCache();
         AttributesFactory attr = new AttributesFactory();
@@ -1399,7 +1399,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
   }
 
   private DistributedMember createPRRegionWithAsyncQueue(VM vm0, final int localMaxMemory) {
-    SerializableCallable createPrRegion = new SerializableCallable("withRegion") {
+    SerializableCallable createPrRegion = new SerializableCallable("createRegion") {
       public Object call() {
         Cache cache = getCache();
 
@@ -1446,7 +1446,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Cache cache = getCache();
         AttributesFactory attr = new AttributesFactory();
@@ -1559,7 +1559,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     VM vm1 = host.getVM(1);
     final VM vm2 = host.getVM(2);
 
-    final SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    final SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Cache cache = getCache();
         AttributesFactory attr = new AttributesFactory();
@@ -1669,7 +1669,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Cache cache = getCache();
         AttributesFactory attr = new AttributesFactory();
@@ -1812,7 +1812,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     EXPECTED_REBALANCED.add("/region0");
     EXPECTED_REBALANCED.add("/region1");
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Cache cache = getCache();
         AttributesFactory attr = new AttributesFactory();
@@ -1943,7 +1943,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     VM vm1 = host.getVM(1);
     VM vm2 = host.getVM(2);
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Cache cache = getCache();
         AttributesFactory attr = new AttributesFactory();
@@ -2058,7 +2058,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     VM vm2 = host.getVM(2);
     VM vm3 = host.getVM(3);
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Cache cache = getCache();
         AttributesFactory attr = new AttributesFactory();
@@ -2268,7 +2268,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     VM vm1 = host.getVM(1);
     VM vm2 = host.getVM(2);
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Region parent;
         Cache cache = getCache();
@@ -2575,7 +2575,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Cache cache = getCache();
         AttributesFactory attr = new AttributesFactory();
@@ -2741,7 +2741,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     VM vm2 = host.getVM(2);
     VM vm3 = host.getVM(3);
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Cache cache = getCache();
         DiskStoreFactory dsf = cache.createDiskStoreFactory();
@@ -3009,7 +3009,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
 
     LoadProbe oldProbe = setLoadProbe(vm0, new BucketCountLoadProbe());
     try {
-      SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+      SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
         public void run() {
           Cache cache = getCache();
           AttributesFactory attr = new AttributesFactory();
@@ -3131,7 +3131,7 @@ public class RebalanceOperationDUnitTest extends JUnit4CacheTestCase {
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         System.setProperty(DiskStoreImpl.RECOVER_VALUE_PROPERTY_NAME, "false");
         try {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARQueueNewImplDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARQueueNewImplDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARQueueNewImplDUnitTest.java
index 83f3b3f..12e5819 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARQueueNewImplDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/ha/HARQueueNewImplDUnitTest.java
@@ -1036,7 +1036,7 @@ public class HARQueueNewImplDUnitTest extends JUnit4DistributedTestCase {
         server.start();
       }
     } catch (Exception e) {
-      fail("failed in buildInThisVM()" + e);
+      fail("failed in startServer()" + e);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/Bug39356DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/Bug39356DUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/Bug39356DUnitTest.java
index 1d41291..5705c09 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/Bug39356DUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/Bug39356DUnitTest.java
@@ -181,7 +181,7 @@ public class Bug39356DUnitTest extends JUnit4CacheTestCase {
     VM vm0 = host.getVM(0);
     VM vm1 = host.getVM(1);
 
-    SerializableRunnable createPrRegion = new SerializableRunnable("withRegion") {
+    SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
       public void run() {
         Cache cache = getCache();
         AttributesFactory attr = new AttributesFactory();

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ShutdownAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ShutdownAllDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ShutdownAllDUnitTest.java
index 2cdd23b..11254e7 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ShutdownAllDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ShutdownAllDUnitTest.java
@@ -416,15 +416,15 @@ public class ShutdownAllDUnitTest extends JUnit4CacheTestCase {
 
   /*
    * @Test public void testStopNonPersistRegions() throws Throwable { Host host = Host.getHost(0);
-   * VM vm0 = host.getVM(0); VM vm1 = host.getVM(1); VM vm2 = host.getVM(2); withRegion(vm0,
-   * "region", null, true, 1); withRegion(vm1, "region", "disk", true, 1);
+   * VM vm0 = host.getVM(0); VM vm1 = host.getVM(1); VM vm2 = host.getVM(2); createRegion(vm0,
+   * "region", null, true, 1); createRegion(vm1, "region", "disk", true, 1);
    * 
    * createData(vm0, 0, 1, "a", "region");
    * 
    * shutDownAllMembers(vm2, 2);
    * 
-   * // restart vms, and let vm0 to do GII from vm0 withRegion(vm1, "region", "disk", true, 1);
-   * withRegion(vm0, "region", null, true, 1);
+   * // restart vms, and let vm0 to do GII from vm0 createRegion(vm1, "region", "disk", true, 1);
+   * createRegion(vm0, "region", null, true, 1);
    * 
    * checkData(vm0, 0, 1, "a", "region"); checkData(vm1, 0, 1, "a", "region");
    * 

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/internal/cache/rollingupgrade/RollingUpgrade2DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/rollingupgrade/RollingUpgrade2DUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/rollingupgrade/RollingUpgrade2DUnitTest.java
index 6d96471..beb3a9a 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/rollingupgrade/RollingUpgrade2DUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/rollingupgrade/RollingUpgrade2DUnitTest.java
@@ -1456,12 +1456,12 @@ public class RollingUpgrade2DUnitTest extends JUnit4DistributedTestCase {
 
   private CacheSerializableRunnable invokeCreateRegion(final String regionName,
       final RegionShortcut shortcut) {
-    return new CacheSerializableRunnable("execute: withRegion") {
+    return new CacheSerializableRunnable("execute: createRegion") {
       public void run2() {
         try {
           createRegion(RollingUpgrade2DUnitTest.cache, regionName, shortcut);
         } catch (Exception e) {
-          fail("Error withRegion", e);
+          fail("Error createRegion", e);
         }
       }
     };

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/internal/cache/rollingupgrade/RollingUpgradeDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/rollingupgrade/RollingUpgradeDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/rollingupgrade/RollingUpgradeDUnitTest.java
index 0fffb13..0940ea6 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/rollingupgrade/RollingUpgradeDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/rollingupgrade/RollingUpgradeDUnitTest.java
@@ -555,7 +555,7 @@ public class RollingUpgradeDUnitTest extends JUnit4DistributedTestCase {
 
   private CacheSerializableRunnable invokeCreateRegion(final String regionName,
       final String shortcutName) {
-    return new CacheSerializableRunnable("execute: withRegion") {
+    return new CacheSerializableRunnable("execute: createRegion") {
       public void run2() {
         try {
           createRegion(RollingUpgradeDUnitTest.cache, regionName, shortcutName);

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/Bug36829DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/Bug36829DUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/Bug36829DUnitTest.java
index d90d41d..69b8a79 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/Bug36829DUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/Bug36829DUnitTest.java
@@ -87,7 +87,7 @@ public class Bug36829DUnitTest extends JUnit4DistributedTestCase {
 
     // creating Region on the Server
     /*
-     * this.serverVM.invoke(() -> CacheServerTestUtil.withRegion( REGION_NAME )); // should be
+     * this.serverVM.invoke(() -> CacheServerTestUtil.createRegion( REGION_NAME )); // should be
      * successful. this.ClientVM.invoke(() -> Bug36829DUnitTest.registerKeyAfterRegionCreation(
      * "Key1" ));
      */

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java
index 4a67e38..f86b39f 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java
@@ -366,7 +366,7 @@ public class DataSerializerPropogationDUnitTest extends JUnit4DistributedTestCas
       assertNotNull(bs);
       bs.start();
     } catch (Exception ex) {
-      fail("while buildInThisVM()  " + ex);
+      fail("while startServer()  " + ex);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
index 6aea509..98cb309 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
@@ -361,7 +361,7 @@ public class HAStartupAndFailoverDUnitTest extends JUnit4DistributedTestCase {
   }
 
   // public static void processException() {
-  // assertIndexDetailsEquals(conn.getServer().getServerPort(), PORT1.intValue());
+  // assertIndexDetailsEquals(conn.getServer().getPort(), PORT1.intValue());
   // try {
   // pool.processException(new Exception("dummy"), conn);
   // //Thread.sleep(10000); // why sleep?
@@ -402,7 +402,7 @@ public class HAStartupAndFailoverDUnitTest extends JUnit4DistributedTestCase {
       assertNotNull(bs);
       bs.start();
     } catch (Exception ex) {
-      fail("while buildInThisVM()  " + ex);
+      fail("while startServer()  " + ex);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/InstantiatorPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/InstantiatorPropagationDUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/InstantiatorPropagationDUnitTest.java
index 698f795..1fcb06a 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/InstantiatorPropagationDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/InstantiatorPropagationDUnitTest.java
@@ -408,7 +408,7 @@ public class InstantiatorPropagationDUnitTest extends JUnit4DistributedTestCase
       assertNotNull(bs);
       bs.start();
     } catch (Exception ex) {
-      fail("while buildInThisVM()  " + ex);
+      fail("while startServer()  " + ex);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/RedundancyLevelTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/RedundancyLevelTestBase.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/RedundancyLevelTestBase.java
index 4a98298..52a041b 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/RedundancyLevelTestBase.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/RedundancyLevelTestBase.java
@@ -478,7 +478,7 @@ public class RedundancyLevelTestBase extends JUnit4DistributedTestCase {
       assertNotNull(bs);
       bs.start();
     } catch (Exception ex) {
-      Assert.fail("while buildInThisVM()", ex);
+      Assert.fail("while startServer()", ex);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ExportLogsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ExportLogsIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ExportLogsIntegrationTest.java
index 3c53dfe..0b012c9 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ExportLogsIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ExportLogsIntegrationTest.java
@@ -22,19 +22,19 @@ import org.apache.geode.test.dunit.rules.GfshShellConnectionRule;
 import org.apache.geode.test.dunit.rules.LocatorStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.junit.Before;
+import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import java.nio.file.Path;
-
 import java.io.File;
+import java.nio.file.Path;
 
 @Category(IntegrationTest.class)
 public class ExportLogsIntegrationTest {
 
-  @Rule
-  public LocatorStarterRule locator = new LocatorStarterRule().withJMXManager().startLocator();
+  @ClassRule
+  public static LocatorStarterRule locator = new LocatorStarterRule().withAutoStart();
 
   @Rule
   public GfshShellConnectionRule gfsh = new GfshShellConnectionRule();

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/cli/functions/ExportLogsFunctionIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/functions/ExportLogsFunctionIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/functions/ExportLogsFunctionIntegrationTest.java
index af9a1e6..e47cefb 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/functions/ExportLogsFunctionIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/functions/ExportLogsFunctionIntegrationTest.java
@@ -25,8 +25,6 @@ import org.apache.geode.cache.execute.FunctionContext;
 import org.apache.geode.cache.execute.ResultSender;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.execute.FunctionContextImpl;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
 import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.logging.log4j.Level;
@@ -42,7 +40,7 @@ import java.io.IOException;
 public class ExportLogsFunctionIntegrationTest {
 
   @Rule
-  public LocalServerStarterRule serverStarterRule = new ServerStarterBuilder().buildInThisVM();
+  public ServerStarterRule serverStarterRule = new ServerStarterRule().withAutoStart();
   private File serverWorkingDir;
 
   @Before

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/cli/shell/GfshMultilineCommandTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/shell/GfshMultilineCommandTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/shell/GfshMultilineCommandTest.java
index 0d33058..7b11444 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/shell/GfshMultilineCommandTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/shell/GfshMultilineCommandTest.java
@@ -21,8 +21,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
 import org.apache.geode.test.dunit.rules.GfshShellConnectionRule;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.junit.Rule;
 import org.junit.Test;
@@ -33,8 +32,7 @@ import org.junit.experimental.categories.Category;
 public class GfshMultilineCommandTest {
 
   @Rule
-  public LocalServerStarterRule server =
-      new ServerStarterBuilder().withJMXManager().buildInThisVM();
+  public ServerStarterRule server = new ServerStarterRule().withJMXManager().withAutoStart();
 
 
   @Rule

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/cli/util/LogExporterIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/cli/util/LogExporterIntegrationTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/cli/util/LogExporterIntegrationTest.java
index a831ac1..dc24a57 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/cli/util/LogExporterIntegrationTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/cli/util/LogExporterIntegrationTest.java
@@ -22,13 +22,9 @@ import static org.assertj.core.api.Assertions.assertThat;
 import com.google.common.collect.Sets;
 
 import org.apache.geode.management.internal.cli.functions.ExportLogsFunctionIntegrationTest;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
-import org.apache.geode.test.dunit.rules.Server;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
 import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.logging.log4j.Level;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Rule;
@@ -44,34 +40,27 @@ import java.util.Set;
 
 @Category(IntegrationTest.class)
 public class LogExporterIntegrationTest {
+
+  @Rule
+  public ServerStarterRule server = new ServerStarterRule();
+
   private LogExporter logExporter;
 
   private Properties properties;
 
   private LogFilter filter = new LogFilter(Level.INFO, null, null);
 
-  LocalServerStarterRule serverStarterRule;
-
   @Before
   public void before() throws Exception {
     properties = new Properties();
   }
 
-  @After
-  public void after() {
-    if (serverStarterRule != null) {
-      serverStarterRule.after();
-    }
-  }
-
   @Test
-  public void serverStartedWithWrongSuffix() throws Throwable {
-    serverStarterRule =
-        new ServerStarterBuilder().withProperty(LOG_FILE, new File("test.txt").getAbsolutePath())
-            .withProperty(STATISTIC_ARCHIVE_FILE, "archive.archive").buildInThisVM();
-    serverStarterRule.before();
-
-    File serverWorkingDir = serverStarterRule.getWorkingDir();
+  public void serverStartedWithWrongSuffix() throws Exception {
+    properties.setProperty(LOG_FILE, new File("test.txt").getAbsolutePath());
+    properties.setProperty(STATISTIC_ARCHIVE_FILE, "archive.archive");
+    server.withProperties(properties).startServer();
+    File serverWorkingDir = server.getWorkingDir();
 
     logExporter = new LogExporter(filter, new File(serverWorkingDir, "test.log"),
         new File(serverWorkingDir, "stats.gfs"));
@@ -83,18 +72,15 @@ public class LogExporterIntegrationTest {
   }
 
   @Test
-  @Ignore // This test assume that new File() ends up in the workingDir, which is not true
-  public void serverStartedWithCorrectSuffix() throws Throwable {
-
-    serverStarterRule =
-        new ServerStarterBuilder().withProperty(LOG_FILE, new File("test.log").getAbsolutePath())
-            .withProperty(STATISTIC_ARCHIVE_FILE, "archive.gfs").buildInThisVM();
-    serverStarterRule.before();
-
+  public void serverStartedWithCorrectSuffix() throws Exception {
     // ("relative log file is problematic in the test environment")
-    File serverWorkingDir = serverStarterRule.getWorkingDir();
+    properties.setProperty(LOG_FILE, new File("test.log").getAbsolutePath());
+    properties.setProperty(STATISTIC_ARCHIVE_FILE, "archive.gfs");
+    server.withProperties(properties).startServer();
+    File serverWorkingDir = server.getWorkingDir();
 
-    logExporter = new LogExporter(filter, new File("test.log"), new File("archive.gfs"));
+    logExporter = new LogExporter(filter, new File(serverWorkingDir, "test.log"),
+        new File(serverWorkingDir, "archive.gfs"));
     List<Path> logFiles = logExporter.findLogFiles(serverWorkingDir.toPath());
     assertThat(logFiles).hasSize(1);
     assertThat(logFiles.get(0)).hasFileName("test.log");
@@ -106,12 +92,11 @@ public class LogExporterIntegrationTest {
 
   @Test
   @Ignore("fix .gz suffix")
-  public void serverStartedWithGZSuffix() throws Throwable {
-    serverStarterRule = new ServerStarterBuilder().withProperty(LOG_FILE, "test.log.gz")
-        .withProperty(STATISTIC_ARCHIVE_FILE, "archive.gfs.gz").buildInThisVM();
-    serverStarterRule.before();
-
-    File serverWorkingDir = serverStarterRule.getWorkingDir();
+  public void serverStartedWithGZSuffix() throws Exception {
+    properties.setProperty(LOG_FILE, "test.log.gz");
+    properties.setProperty(STATISTIC_ARCHIVE_FILE, "archive.gfs.gz");
+    server.withProperties(properties).startServer();
+    File serverWorkingDir = server.getWorkingDir();
 
     logExporter = new LogExporter(filter, new File(serverWorkingDir, "test.log"),
         new File(serverWorkingDir, "stats.gfs"));
@@ -125,10 +110,8 @@ public class LogExporterIntegrationTest {
   @Test
   public void testNoStatsFile() throws Throwable {
     Path logsFile = Files.createTempFile("server", ".log");
-
-    serverStarterRule =
-        new ServerStarterBuilder().withProperty(LOG_FILE, logsFile.toString()).buildInThisVM();
-    serverStarterRule.before();
+    properties.setProperty(LOG_FILE, logsFile.toString());
+    server.withProperties(properties).startServer();
 
     ExportLogsFunctionIntegrationTest.verifyExportLogsFunctionDoesNotBlowUp();
   }
@@ -136,10 +119,10 @@ public class LogExporterIntegrationTest {
   @Test
   public void testWithRelativeStatsFile() throws Throwable {
     Path logsFile = Files.createTempFile("server", ".log");
-
-    serverStarterRule = new ServerStarterBuilder().withProperty(LOG_FILE, logsFile.toString())
-        .withProperty(STATISTIC_ARCHIVE_FILE, "stats.gfs").buildInThisVM();
-    serverStarterRule.before();
+    // Path statsFile = Files.createTempFile("stats", ".gfs");
+    properties.setProperty(LOG_FILE, logsFile.toString());
+    properties.setProperty(STATISTIC_ARCHIVE_FILE, "stats.gfs");
+    server.withProperties(properties).startServer();
 
     ExportLogsFunctionIntegrationTest.verifyExportLogsFunctionDoesNotBlowUp();
   }
@@ -147,25 +130,25 @@ public class LogExporterIntegrationTest {
   @Test
   public void testWithRelativeLogsFile() throws Throwable {
     Path statsFile = Files.createTempFile("stats", ".gfs");
-
-    serverStarterRule = new ServerStarterBuilder().withProperty(LOG_FILE, "sever.log")
-        .withProperty(STATISTIC_ARCHIVE_FILE, statsFile.toString()).buildInThisVM();
-    serverStarterRule.before();
+    properties.setProperty(LOG_FILE, "sever.log");
+    properties.setProperty(STATISTIC_ARCHIVE_FILE, statsFile.toString());
+    server.withProperties(properties).startServer();
 
     ExportLogsFunctionIntegrationTest.verifyExportLogsFunctionDoesNotBlowUp();
   }
 
   @Test
-  public void testWithAbsoluteLogsStatsFile() throws Throwable {
+  public void testWithAbsoluteLogsStatsFile() throws Exception {
     File logsDir = Files.createTempDirectory("logs").toFile();
     File statsDir = Files.createTempDirectory("stats").toFile();
 
     File logFile = new File(logsDir, "server.log");
     File statsFile = new File(statsDir, "stats.gfs");
 
-    serverStarterRule = new ServerStarterBuilder().withProperty(LOG_FILE, logFile.getAbsolutePath())
-        .withProperty(STATISTIC_ARCHIVE_FILE, statsFile.getAbsolutePath()).buildInThisVM();
-    serverStarterRule.before();
+    properties.setProperty(LOG_FILE, logFile.getAbsolutePath());
+    properties.setProperty(STATISTIC_ARCHIVE_FILE, statsFile.getAbsolutePath());
+
+    server.withProperties(properties).startServer();
 
     logExporter = new LogExporter(filter, logFile, statsFile);
     Path exportedZip = logExporter.export();

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/AccessControlMBeanJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/AccessControlMBeanJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/AccessControlMBeanJUnitTest.java
index d992e93..626ca45 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/AccessControlMBeanJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/AccessControlMBeanJUnitTest.java
@@ -19,9 +19,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
 import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
@@ -36,15 +34,15 @@ public class AccessControlMBeanJUnitTest {
   private AccessControlMXBean bean;
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @Before
   public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanAuthenticationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanAuthenticationJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanAuthenticationJUnitTest.java
index 97436e0..9a1605a 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanAuthenticationJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanAuthenticationJUnitTest.java
@@ -19,9 +19,7 @@ import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANA
 import org.apache.geode.management.CacheServerMXBean;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
 import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.junit.Before;
@@ -35,15 +33,15 @@ public class CacheServerMBeanAuthenticationJUnitTest {
   private CacheServerMXBean bean;
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @Before
   public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanAuthorizationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanAuthorizationJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanAuthorizationJUnitTest.java
index c9e3553..c7c76f6 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanAuthorizationJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanAuthorizationJUnitTest.java
@@ -20,9 +20,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import org.apache.geode.management.CacheServerMXBean;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
 import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
@@ -37,15 +35,15 @@ public class CacheServerMBeanAuthorizationJUnitTest {
   private CacheServerMXBean bean;
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @Before
   public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanShiroJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanShiroJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanShiroJUnitTest.java
index 91efeac..d0ea209 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanShiroJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/CacheServerMBeanShiroJUnitTest.java
@@ -19,9 +19,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
 import org.apache.geode.management.CacheServerMXBean;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
 import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
@@ -36,12 +34,12 @@ public class CacheServerMBeanShiroJUnitTest {
   private CacheServerMXBean bean;
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
-      .withProperty(SECURITY_SHIRO_INIT, "shiro.ini").withJMXManager().buildInThisVM();
+  public static ServerStarterRule server = new ServerStarterRule()
+      .withProperty(SECURITY_SHIRO_INIT, "shiro.ini").withJMXManager().withAutoStart();
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @Before
   public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/CliCommandsSecurityTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/CliCommandsSecurityTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/CliCommandsSecurityTest.java
index f132163..a66f05b 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/CliCommandsSecurityTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/CliCommandsSecurityTest.java
@@ -23,9 +23,8 @@ import org.apache.geode.management.MemberMXBean;
 import org.apache.geode.security.NotAuthorizedException;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.Before;
@@ -43,15 +42,15 @@ public class CliCommandsSecurityTest {
   private List<TestCommand> commands = TestCommand.getCommands();
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @Before
   public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/DataCommandsSecurityTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/DataCommandsSecurityTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/DataCommandsSecurityTest.java
index f6b5a2e..f746aaf 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/DataCommandsSecurityTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/DataCommandsSecurityTest.java
@@ -22,9 +22,8 @@ import org.apache.geode.management.MemberMXBean;
 import org.apache.geode.security.GemFireSecurityException;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.Before;
@@ -39,11 +38,11 @@ public class DataCommandsSecurityTest {
   private MemberMXBean bean;
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @BeforeClass
   public static void beforeClass() throws Exception {
@@ -55,7 +54,7 @@ public class DataCommandsSecurityTest {
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @Before
   public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/DeployCommandsSecurityTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/DeployCommandsSecurityTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/DeployCommandsSecurityTest.java
index b619032..a4b8c67 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/DeployCommandsSecurityTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/DeployCommandsSecurityTest.java
@@ -22,9 +22,8 @@ import org.apache.geode.management.MemberMXBean;
 import org.apache.geode.security.NotAuthorizedException;
 import org.apache.geode.security.SimpleTestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.Before;
@@ -43,9 +42,9 @@ public class DeployCommandsSecurityTest {
   private MemberMXBean bean;
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule()
       .withProperty(SECURITY_MANAGER, SimpleTestSecurityManager.class.getName()).withJMXManager()
-      .buildInThisVM();
+      .withAutoStart();
 
   @ClassRule
   public static TemporaryFolder temporaryFolder = new TemporaryFolder();
@@ -60,7 +59,7 @@ public class DeployCommandsSecurityTest {
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @Before
   public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/DiskStoreMXBeanSecurityJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/DiskStoreMXBeanSecurityJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/DiskStoreMXBeanSecurityJUnitTest.java
index feb00d4..e6502c0 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/DiskStoreMXBeanSecurityJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/DiskStoreMXBeanSecurityJUnitTest.java
@@ -20,9 +20,8 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import org.apache.geode.management.DiskStoreMXBean;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.Before;
@@ -37,11 +36,11 @@ public class DiskStoreMXBeanSecurityJUnitTest {
   private DiskStoreMXBean bean;
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @BeforeClass
   public static void beforeClass() throws Exception {
@@ -50,7 +49,7 @@ public class DiskStoreMXBeanSecurityJUnitTest {
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @Before
   public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/GatewayReceiverMBeanSecurityTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/GatewayReceiverMBeanSecurityTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/GatewayReceiverMBeanSecurityTest.java
index e7fe1d6..73783d5 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/GatewayReceiverMBeanSecurityTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/GatewayReceiverMBeanSecurityTest.java
@@ -22,9 +22,8 @@ import org.apache.geode.management.GatewayReceiverMXBean;
 import org.apache.geode.management.ManagementService;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.AfterClass;
@@ -47,15 +46,15 @@ public class GatewayReceiverMBeanSecurityTest {
   private GatewayReceiverMXBean bean;
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @BeforeClass
   public static void beforeClass() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/GatewaySenderMBeanSecurityTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/GatewaySenderMBeanSecurityTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/GatewaySenderMBeanSecurityTest.java
index 67cb1cc..887d0dc 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/GatewaySenderMBeanSecurityTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/GatewaySenderMBeanSecurityTest.java
@@ -23,9 +23,8 @@ import org.apache.geode.management.ManagementService;
 import org.apache.geode.management.internal.beans.GatewaySenderMBean;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.AfterClass;
@@ -47,15 +46,15 @@ public class GatewaySenderMBeanSecurityTest {
   private GatewaySenderMXBean bean;
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @BeforeClass
   public static void beforeClass() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/GfshCommandsPostProcessorTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/GfshCommandsPostProcessorTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/GfshCommandsPostProcessorTest.java
index 6f2754f..1486866 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/GfshCommandsPostProcessorTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/GfshCommandsPostProcessorTest.java
@@ -23,8 +23,7 @@ import org.apache.geode.security.TestPostProcessor;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
 import org.apache.geode.test.dunit.rules.GfshShellConnectionRule;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.BeforeClass;
@@ -37,20 +36,20 @@ import org.junit.experimental.categories.Category;
 public class GfshCommandsPostProcessorTest {
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule serverStarter = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_POST_PROCESSOR, TestPostProcessor.class.getName())
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty("security-json",
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
-  public GfshShellConnectionRule gfshConnection =
-      new GfshShellConnectionRule(server.getJmxPort(), GfshShellConnectionRule.PortType.jmxManger);
+  public GfshShellConnectionRule gfshConnection = new GfshShellConnectionRule(
+      serverStarter::getJmxPort, GfshShellConnectionRule.PortType.jmxManger);
 
   @BeforeClass
   public static void beforeClass() throws Exception {
-    server.getCache().createRegionFactory(RegionShortcut.REPLICATE).create("region1");
+    serverStarter.getCache().createRegionFactory(RegionShortcut.REPLICATE).create("region1");
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/GfshCommandsSecurityTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/GfshCommandsSecurityTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/GfshCommandsSecurityTest.java
index 3fe8314..84ef3fc 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/GfshCommandsSecurityTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/GfshCommandsSecurityTest.java
@@ -30,8 +30,7 @@ import org.apache.geode.management.internal.cli.result.ResultBuilder;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
 import org.apache.geode.test.dunit.rules.GfshShellConnectionRule;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.apache.shiro.authz.permission.WildcardPermission;
@@ -46,15 +45,15 @@ import java.util.List;
 @Category({IntegrationTest.class, SecurityTest.class})
 public class GfshCommandsSecurityTest {
   @ClassRule
-  public static LocalServerStarterRule serverStarter = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule serverStarter = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty("security-json",
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
   public GfshShellConnectionRule gfshConnection = new GfshShellConnectionRule(
-      serverStarter.getJmxPort(), GfshShellConnectionRule.PortType.jmxManger);
+      serverStarter::getJmxPort, GfshShellConnectionRule.PortType.jmxManger);
 
   @BeforeClass
   public static void beforeClass() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/JavaRmiServerNameTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/JavaRmiServerNameTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/JavaRmiServerNameTest.java
index 66e2702..6d20a69 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/JavaRmiServerNameTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/JavaRmiServerNameTest.java
@@ -18,8 +18,7 @@ package org.apache.geode.management.internal.security;
 
 import static org.junit.Assert.assertEquals;
 
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.junit.After;
 import org.junit.ClassRule;
@@ -32,8 +31,8 @@ public class JavaRmiServerNameTest {
   private static final String JMX_HOST = "myHostname";
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder()
-      .withProperty("jmx-manager-hostname-for-clients", JMX_HOST).withJMXManager().buildInThisVM();
+  public static ServerStarterRule serverStarter = new ServerStarterRule()
+      .withProperty("jmx-manager-hostname-for-clients", JMX_HOST).withJMXManager().withAutoStart();
 
   /**
    * this is for GEODE-1548

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/LockServiceMBeanAuthorizationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/LockServiceMBeanAuthorizationJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/LockServiceMBeanAuthorizationJUnitTest.java
index d2f0cae..dad2e9c 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/LockServiceMBeanAuthorizationJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/LockServiceMBeanAuthorizationJUnitTest.java
@@ -23,9 +23,8 @@ import org.apache.geode.distributed.internal.locks.DLockService;
 import org.apache.geode.management.LockServiceMXBean;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.AfterClass;
@@ -41,15 +40,15 @@ public class LockServiceMBeanAuthorizationJUnitTest {
   private LockServiceMXBean lockServiceMBean;
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @BeforeClass
   public static void beforeClassSetUp() {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/MBeanSecurityJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/MBeanSecurityJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/MBeanSecurityJUnitTest.java
index 9dcba94..30ed267 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/MBeanSecurityJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/MBeanSecurityJUnitTest.java
@@ -25,9 +25,8 @@ import org.apache.geode.management.MemberMXBean;
 import org.apache.geode.management.internal.MBeanJMXAdapter;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.ClassRule;
@@ -48,15 +47,15 @@ import javax.management.ReflectionException;
 @Category({IntegrationTest.class, SecurityTest.class})
 public class MBeanSecurityJUnitTest {
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   /**
    * No user can call createBean or unregisterBean of GemFire Domain

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/ManagerMBeanAuthorizationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/ManagerMBeanAuthorizationJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/ManagerMBeanAuthorizationJUnitTest.java
index b7447c9..77f68c3 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/ManagerMBeanAuthorizationJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/ManagerMBeanAuthorizationJUnitTest.java
@@ -22,9 +22,8 @@ import org.apache.geode.management.ManagerMXBean;
 import org.apache.geode.management.internal.beans.ManagerMBean;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.Before;
@@ -42,15 +41,15 @@ public class ManagerMBeanAuthorizationJUnitTest {
   private ManagerMXBean managerMXBean;
 
   @ClassRule
-  public static LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public static ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @BeforeClass
   public static void beforeClassSetup() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/management/internal/security/MemberMBeanSecurityJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/MemberMBeanSecurityJUnitTest.java b/geode-core/src/test/java/org/apache/geode/management/internal/security/MemberMBeanSecurityJUnitTest.java
index 11e2026..65fd528 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/MemberMBeanSecurityJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/MemberMBeanSecurityJUnitTest.java
@@ -20,9 +20,8 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import org.apache.geode.management.MemberMXBean;
 import org.apache.geode.security.TestSecurityManager;
 import org.apache.geode.test.dunit.rules.ConnectionConfiguration;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
 import org.apache.geode.test.dunit.rules.MBeanServerConnectionRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.Before;
@@ -35,15 +34,15 @@ public class MemberMBeanSecurityJUnitTest {
   private MemberMXBean bean;
 
   @Rule // do not use a ClassRule since some test will do a shutdownMember
-  public LocalServerStarterRule server = new ServerStarterBuilder().withJMXManager()
+  public ServerStarterRule server = new ServerStarterRule().withJMXManager()
       .withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
       .withProperty(TestSecurityManager.SECURITY_JSON,
           "org/apache/geode/management/internal/security/cacheServer.json")
-      .buildInThisVM();
+      .withAutoStart();
 
   @Rule
   public MBeanServerConnectionRule connectionRule =
-      new MBeanServerConnectionRule(server.getJmxPort());
+      new MBeanServerConnectionRule(server::getJmxPort);
 
   @Before
   public void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/security/ClientAuthDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/security/ClientAuthDUnitTest.java b/geode-core/src/test/java/org/apache/geode/security/ClientAuthDUnitTest.java
index 76efae5..d7acf79 100644
--- a/geode-core/src/test/java/org/apache/geode/security/ClientAuthDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/security/ClientAuthDUnitTest.java
@@ -21,11 +21,9 @@ import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.dunit.IgnoredException;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.DistributedTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
-import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -37,21 +35,14 @@ public class ClientAuthDUnitTest extends JUnit4DistributedTestCase {
   final VM client1 = host.getVM(1);
   final VM client2 = host.getVM(2);
 
-  int serverPort;
-
-  @Before
-  public void setup() {
-    serverPort = server.getServerPort();
-  }
-
   @Rule
-  public transient LocalServerStarterRule server = new ServerStarterBuilder()
-      .withProperty(SECURITY_MANAGER, SimpleTestSecurityManager.class.getName()).buildInThisVM();
+  public ServerStarterRule server = new ServerStarterRule()
+      .withProperty(SECURITY_MANAGER, SimpleTestSecurityManager.class.getName()).withAutoStart();
 
   @Test
   public void authWithCorrectPasswordShouldPass() {
     client1.invoke("logging in super-user with correct password", () -> {
-      SecurityTestUtil.createClientCache("test", "test", serverPort);
+      SecurityTestUtil.createClientCache("test", "test", server.getPort());
     });
   }
 
@@ -59,8 +50,9 @@ public class ClientAuthDUnitTest extends JUnit4DistributedTestCase {
   public void authWithIncorrectPasswordShouldFail() {
     IgnoredException.addIgnoredException(AuthenticationFailedException.class.getName());
     client2.invoke("logging in super-user with wrong password", () -> {
-      assertThatThrownBy(() -> SecurityTestUtil.createClientCache("test", "wrong", serverPort))
-          .isInstanceOf(AuthenticationFailedException.class);
+      assertThatThrownBy(
+          () -> SecurityTestUtil.createClientCache("test", "wrong", server.getPort()))
+              .isInstanceOf(AuthenticationFailedException.class);
     });
   }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/security/ClientContainsKeyAuthDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/security/ClientContainsKeyAuthDUnitTest.java b/geode-core/src/test/java/org/apache/geode/security/ClientContainsKeyAuthDUnitTest.java
index 0366673..47525f9 100644
--- a/geode-core/src/test/java/org/apache/geode/security/ClientContainsKeyAuthDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/security/ClientContainsKeyAuthDUnitTest.java
@@ -26,8 +26,7 @@ import org.apache.geode.test.dunit.AsyncInvocation;
 import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.DistributedTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
 import org.junit.Before;
@@ -44,11 +43,11 @@ public class ClientContainsKeyAuthDUnitTest extends JUnit4DistributedTestCase {
   final VM client2 = host.getVM(2);
 
   @Rule
-  public LocalServerStarterRule server =
-      new ServerStarterBuilder().withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
+  public ServerStarterRule server =
+      new ServerStarterRule().withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
           .withProperty(TestSecurityManager.SECURITY_JSON,
               "org/apache/geode/management/internal/security/clientServer.json")
-          .buildInThisVM();
+          .withAutoStart();
 
   @Before
   public void before() throws Exception {
@@ -62,7 +61,7 @@ public class ClientContainsKeyAuthDUnitTest extends JUnit4DistributedTestCase {
   @Test
   public void testContainsKey() throws Exception {
     AsyncInvocation ai1 = client1.invokeAsync(() -> {
-      ClientCache cache = createClientCache("key1User", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("key1User", "1234567", server.getPort());
       final Region region = createProxyRegion(cache, REGION_NAME);
       assertTrue(region.containsKeyOnServer("key1"));
       SecurityTestUtil.assertNotAuthorized(() -> region.containsKeyOnServer("key3"),
@@ -70,7 +69,7 @@ public class ClientContainsKeyAuthDUnitTest extends JUnit4DistributedTestCase {
     });
 
     AsyncInvocation ai2 = client2.invokeAsync(() -> {
-      ClientCache cache = createClientCache("authRegionReader", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("authRegionReader", "1234567", server.getPort());
       final Region region = createProxyRegion(cache, REGION_NAME);
       region.containsKeyOnServer("key3");
       assertTrue(region.containsKeyOnServer("key1"));

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/security/ClientDestroyInvalidateAuthDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/security/ClientDestroyInvalidateAuthDUnitTest.java b/geode-core/src/test/java/org/apache/geode/security/ClientDestroyInvalidateAuthDUnitTest.java
index 841d98e..f60488b 100644
--- a/geode-core/src/test/java/org/apache/geode/security/ClientDestroyInvalidateAuthDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/security/ClientDestroyInvalidateAuthDUnitTest.java
@@ -21,8 +21,7 @@ import org.apache.geode.cache.RegionShortcut;
 import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -44,11 +43,11 @@ public class ClientDestroyInvalidateAuthDUnitTest extends JUnit4DistributedTestC
   final VM client2 = host.getVM(2);
 
   @Rule
-  public LocalServerStarterRule server =
-      new ServerStarterBuilder().withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
+  public ServerStarterRule server =
+      new ServerStarterRule().withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
           .withProperty(TestSecurityManager.SECURITY_JSON,
               "org/apache/geode/management/internal/security/clientServer.json")
-          .buildInThisVM();
+          .withAutoStart();
 
   @Before
   public void before() throws Exception {
@@ -65,7 +64,7 @@ public class ClientDestroyInvalidateAuthDUnitTest extends JUnit4DistributedTestC
     // Delete one key and invalidate another key with an authorized user.
     AsyncInvocation ai1 = client1.invokeAsync(() -> {
       ClientCache cache =
-          SecurityTestUtil.createClientCache("dataUser", "1234567", server.getServerPort());
+          SecurityTestUtil.createClientCache("dataUser", "1234567", server.getPort());
 
       Region region =
           cache.createClientRegionFactory(ClientRegionShortcut.PROXY).create(REGION_NAME);
@@ -85,7 +84,7 @@ public class ClientDestroyInvalidateAuthDUnitTest extends JUnit4DistributedTestC
     // Delete one key and invalidate another key with an unauthorized user.
     AsyncInvocation ai2 = client2.invokeAsync(() -> {
       ClientCache cache =
-          SecurityTestUtil.createClientCache("authRegionReader", "1234567", server.getServerPort());
+          SecurityTestUtil.createClientCache("authRegionReader", "1234567", server.getPort());
 
       Region region =
           cache.createClientRegionFactory(ClientRegionShortcut.PROXY).create(REGION_NAME);

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/security/ClientDestroyRegionAuthDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/security/ClientDestroyRegionAuthDUnitTest.java b/geode-core/src/test/java/org/apache/geode/security/ClientDestroyRegionAuthDUnitTest.java
index 5ea65d8..19960fb 100644
--- a/geode-core/src/test/java/org/apache/geode/security/ClientDestroyRegionAuthDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/security/ClientDestroyRegionAuthDUnitTest.java
@@ -24,11 +24,9 @@ import org.apache.geode.cache.client.ClientRegionShortcut;
 import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.apache.geode.test.junit.categories.DistributedTest;
 import org.apache.geode.test.junit.categories.SecurityTest;
-import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -36,7 +34,6 @@ import org.junit.experimental.categories.Category;
 @Category({DistributedTest.class, SecurityTest.class})
 public class ClientDestroyRegionAuthDUnitTest extends JUnit4DistributedTestCase {
   private static String REGION_NAME = "testRegion";
-  private int serverPort;
 
   final Host host = Host.getHost(0);
   final VM client1 = host.getVM(1);
@@ -44,22 +41,17 @@ public class ClientDestroyRegionAuthDUnitTest extends JUnit4DistributedTestCase
   final VM client3 = host.getVM(3);
 
   @Rule
-  public LocalServerStarterRule server =
-      new ServerStarterBuilder().withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
+  public ServerStarterRule server =
+      new ServerStarterRule().withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
           .withProperty(TestSecurityManager.SECURITY_JSON,
               "org/apache/geode/management/internal/security/clientServer.json")
-          .withRegion(RegionShortcut.REPLICATE, REGION_NAME).buildInThisVM();
-
-  @Before
-  public void setup() {
-    serverPort = server.getServerPort();
-  }
+          .withRegion(RegionShortcut.REPLICATE, REGION_NAME);
 
   @Test
   public void testDestroyRegion() throws InterruptedException {
     client1.invoke(() -> {
       ClientCache cache =
-          SecurityTestUtil.createClientCache("dataWriter", "1234567", server.getServerPort());
+          SecurityTestUtil.createClientCache("dataWriter", "1234567", server.getPort());
 
       Region region =
           cache.createClientRegionFactory(ClientRegionShortcut.PROXY).create(REGION_NAME);
@@ -67,8 +59,8 @@ public class ClientDestroyRegionAuthDUnitTest extends JUnit4DistributedTestCase
     });
 
     client2.invoke(() -> {
-      ClientCache cache = SecurityTestUtil.createClientCache("authRegionManager", "1234567",
-          server.getServerPort());
+      ClientCache cache =
+          SecurityTestUtil.createClientCache("authRegionManager", "1234567", server.getPort());
 
       Region region =
           cache.createClientRegionFactory(ClientRegionShortcut.PROXY).create(REGION_NAME);
@@ -77,7 +69,7 @@ public class ClientDestroyRegionAuthDUnitTest extends JUnit4DistributedTestCase
 
     client3.invoke(() -> {
       ClientCache cache =
-          SecurityTestUtil.createClientCache("super-user", "1234567", server.getServerPort());
+          SecurityTestUtil.createClientCache("super-user", "1234567", server.getPort());
 
       Region region =
           cache.createClientRegionFactory(ClientRegionShortcut.PROXY).create(REGION_NAME);

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-core/src/test/java/org/apache/geode/security/ClientExecuteFunctionAuthDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/security/ClientExecuteFunctionAuthDUnitTest.java b/geode-core/src/test/java/org/apache/geode/security/ClientExecuteFunctionAuthDUnitTest.java
index 2b4c27c..81ed0d1 100644
--- a/geode-core/src/test/java/org/apache/geode/security/ClientExecuteFunctionAuthDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/security/ClientExecuteFunctionAuthDUnitTest.java
@@ -22,9 +22,7 @@ import org.apache.geode.cache.RegionShortcut;
 import org.apache.geode.test.dunit.Host;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
-import org.apache.geode.test.dunit.rules.LocalServerStarterRule;
-import org.apache.geode.test.dunit.rules.ServerStarterBuilder;
-import org.junit.Before;
+import org.apache.geode.test.dunit.rules.ServerStarterRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -49,23 +47,18 @@ public class ClientExecuteFunctionAuthDUnitTest extends JUnit4DistributedTestCas
   private final static Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
 
   @Rule
-  public LocalServerStarterRule server =
-      new ServerStarterBuilder().withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
+  public ServerStarterRule server =
+      new ServerStarterRule().withProperty(SECURITY_MANAGER, TestSecurityManager.class.getName())
           .withProperty(TestSecurityManager.SECURITY_JSON,
               "org/apache/geode/management/internal/security/clientServer.json")
-          .withRegion(RegionShortcut.REPLICATE, REGION_NAME).buildInThisVM();
-
-  @Before
-  public void setup() {
-
-  }
+          .withRegion(RegionShortcut.REPLICATE, REGION_NAME);
 
   @Test
   public void testExecuteRegionFunctionWithClientRegistration() {
 
     FunctionService.registerFunction(function);
     client1.invoke("logging in with dataReader", () -> {
-      ClientCache cache = createClientCache("dataReader", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("dataReader", "1234567", server.getPort());
 
       FunctionService.registerFunction(function);
 
@@ -74,7 +67,7 @@ public class ClientExecuteFunctionAuthDUnitTest extends JUnit4DistributedTestCas
     });
 
     client2.invoke("logging in with super-user", () -> {
-      ClientCache cache = createClientCache("super-user", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("super-user", "1234567", server.getPort());
 
       FunctionService.registerFunction(function);
       ResultCollector rc = FunctionService.onServer(cache.getDefaultPool()).withArgs(Boolean.TRUE)
@@ -88,7 +81,7 @@ public class ClientExecuteFunctionAuthDUnitTest extends JUnit4DistributedTestCas
   public void testExecuteRegionFunctionWithOutClientRegistration() {
     FunctionService.registerFunction(function);
     client1.invoke("logging in with dataReader", () -> {
-      ClientCache cache = createClientCache("dataReader", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("dataReader", "1234567", server.getPort());
       assertNotAuthorized(() -> FunctionService.onServer(cache.getDefaultPool())
           .withArgs(Boolean.TRUE).execute(function.getId()), "DATA:WRITE");
     });


Mime
View raw message