geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [1/4] geode git commit: GEODE-2730: refactor rules
Date Thu, 13 Apr 2017 17:23:59 GMT
Repository: geode
Updated Branches:
  refs/heads/develop 796c15ec5 -> 6a88f1bcc


http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-cq/src/test/java/org/apache/geode/cache/query/dunit/QueryMonitorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/org/apache/geode/cache/query/dunit/QueryMonitorDUnitTest.java
b/geode-cq/src/test/java/org/apache/geode/cache/query/dunit/QueryMonitorDUnitTest.java
index 49d7c28..f298fae 100644
--- a/geode-cq/src/test/java/org/apache/geode/cache/query/dunit/QueryMonitorDUnitTest.java
+++ b/geode-cq/src/test/java/org/apache/geode/cache/query/dunit/QueryMonitorDUnitTest.java
@@ -304,22 +304,22 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
         () -> configServer(20, "testQueryMonitorClientServer")); // All the queries taking
more than
                                                                  // 20ms should be canceled
by Query
                                                                  // monitor.
-    server.invoke("withRegion", () -> createRegion());
+    server.invoke("createRegion", () -> createRegion());
 
     // Initialize server regions.
     server.invoke("populatePortfolioRegions", () -> populatePortfolioRegions(numberOfEntries));
 
     // Initialize Client1 and create client regions.
     client1.invoke("Init client", () -> configClient(serverHostName, serverPort));
-    client1.invoke("withRegion", () -> createRegion());
+    client1.invoke("createRegion", () -> createRegion());
 
     // Initialize Client2 and create client regions.
     client2.invoke("Init client", () -> configClient(serverHostName, serverPort));
-    client2.invoke("withRegion", () -> createRegion());
+    client2.invoke("createRegion", () -> createRegion());
 
     // Initialize Client3 and create client regions.
     client3.invoke("Init client", () -> configClient(serverHostName, serverPort));
-    client3.invoke("withRegion", () -> createRegion());
+    client3.invoke("createRegion", () -> createRegion());
 
     // Execute client queries
 
@@ -395,14 +395,14 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
                                                                           // more than 20ms
should
                                                                           // be canceled
by Query
                                                                           // monitor.
-    server1.invoke("withRegion", () -> createRegion());
+    server1.invoke("createRegion", () -> createRegion());
 
     int serverPort2 = server2.invoke("Create BridgeServer",
         () -> configServer(20, "testQueryMonitorMultiClientMultiServer"));// All the queries
taking
                                                                           // more than 20ms
should
                                                                           // be canceled
by Query
                                                                           // monitor.
-    server2.invoke("withRegion", () -> createRegion());
+    server2.invoke("createRegion", () -> createRegion());
 
     // Initialize server regions.
     server1.invoke("Create Bridge Server", () -> populatePortfolioRegions(numberOfEntries));
@@ -412,11 +412,11 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
 
     // Initialize Client1 and create client regions.
     client1.invoke("Init client", () -> configClient(serverHostName, serverPort1, serverPort2));
-    client1.invoke("withRegion", () -> createRegion());
+    client1.invoke("createRegion", () -> createRegion());
 
     // Initialize Client2 and create client regions.
     client2.invoke("Init client", () -> configClient(serverHostName, serverPort1, serverPort2));
-    client2.invoke("withRegion", () -> createRegion());
+    client2.invoke("createRegion", () -> createRegion());
 
     // Execute client queries
 
@@ -457,7 +457,7 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
                                                                                         
      // by
                                                                                         
      // Query
                                                                                         
      // monitor.
-    server1.invoke("withRegion", () -> createRegion());
+    server1.invoke("createRegion", () -> createRegion());
 
     server2.invoke("Create BridgeServer", () -> configServer(20, "testQueryExecutionLocally"));//
All
                                                                                         
      // the
@@ -472,7 +472,7 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
                                                                                         
      // by
                                                                                         
      // Query
                                                                                         
      // monitor.
-    server2.invoke("withRegion", () -> createRegion());
+    server2.invoke("createRegion", () -> createRegion());
 
     // Initialize server regions.
     server1.invoke("Create Bridge Server", () -> populatePortfolioRegions(numberOfEntries));
@@ -518,7 +518,7 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
                                                                                         
      // by
                                                                                         
      // Query
                                                                                         
      // monitor.
-    server1.invoke("withRegion", () -> createRegion());
+    server1.invoke("createRegion", () -> createRegion());
 
     server2.invoke("Create BridgeServer", () -> configServer(20, "testQueryExecutionLocally"));//
All
                                                                                         
      // the
@@ -533,7 +533,7 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
                                                                                         
      // by
                                                                                         
      // Query
                                                                                         
      // monitor.
-    server2.invoke("withRegion", () -> createRegion());
+    server2.invoke("createRegion", () -> createRegion());
 
     // Initialize server regions.
     server1.invoke("populatePortfolioRegions", () -> populatePortfolioRegions(numberOfEntries));
@@ -629,11 +629,11 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
 
     // Initialize Client1 and create client regions.
     client1.invoke("Init client", () -> configClient(serverHostName, serverPort1));
-    client1.invoke("withRegion", () -> createRegion());
+    client1.invoke("createRegion", () -> createRegion());
 
     // Initialize Client2 and create client regions.
     client2.invoke("Init client", () -> configClient(serverHostName, serverPort2));
-    client2.invoke("withRegion", () -> createRegion());
+    client2.invoke("createRegion", () -> createRegion());
 
     // Execute client queries
 
@@ -729,14 +729,14 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
         () -> configServer(20, "testQueryMonitorRegionWithEviction"));// All the queries
taking more
                                                                       // than 20ms should
be
                                                                       // canceled by Query
monitor.
-    server1.invoke("withRegion",
+    server1.invoke("createRegion",
         () -> createRegion(true, "server1_testQueryMonitorRegionWithEviction"));
 
     int serverPort2 = server2.invoke("Create BridgeServer",
         () -> configServer(20, "testQueryMonitorRegionWithEviction"));// All the queries
taking more
                                                                       // than 20ms should
be
                                                                       // canceled by Query
monitor.
-    server2.invoke("withRegion",
+    server2.invoke("createRegion",
         () -> createRegion(true, "server2_testQueryMonitorRegionWithEviction"));
 
     // Initialize server regions.
@@ -755,11 +755,11 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
 
     // Initialize Client1 and create client regions.
     client1.invoke("Init client", () -> configClient(serverHostName, serverPort1));
-    client1.invoke("withRegion", () -> createRegion());
+    client1.invoke("createRegion", () -> createRegion());
 
     // Initialize Client2 and create client regions.
     client2.invoke("Init client", () -> configClient(serverHostName, serverPort2));
-    client2.invoke("withRegion", () -> createRegion());
+    client2.invoke("createRegion", () -> createRegion());
 
     // Execute client queries
     client1.invoke("Execute Queries", () -> executeQueriesFromClient(20));
@@ -803,7 +803,7 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
                                                                                         
         // by
                                                                                         
         // Query
                                                                                         
         // monitor.
-    server1.invoke("withRegion", () -> createRegion());
+    server1.invoke("createRegion", () -> createRegion());
 
     int serverPort2 =
         server2.invoke("configServer", () -> configServer(20, "testQueryMonitorRegionWithIndex"));//
All
@@ -819,7 +819,7 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
                                                                                         
         // by
                                                                                         
         // Query
                                                                                         
         // monitor.
-    server2.invoke("withRegion", () -> createRegion());
+    server2.invoke("createRegion", () -> createRegion());
 
     // pause(1000);
 
@@ -831,11 +831,11 @@ public class QueryMonitorDUnitTest extends JUnit4CacheTestCase {
 
     // Initialize Client1 and create client regions.
     client1.invoke("Init client", () -> configClient(serverHostName, serverPort1));
-    client1.invoke("withRegion", () -> createRegion());
+    client1.invoke("createRegion", () -> createRegion());
 
     // Initialize Client2 and create client regions.
     client2.invoke("Init client", () -> configClient(serverHostName, serverPort2));
-    client2.invoke("withRegion", () -> createRegion());
+    client2.invoke("createRegion", () -> createRegion());
 
     // Execute client queries
     client1.invoke("executeQueriesFromClient", () -> executeQueriesFromClient(20));

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-cq/src/test/java/org/apache/geode/internal/cache/ha/CQListGIIDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/org/apache/geode/internal/cache/ha/CQListGIIDUnitTest.java
b/geode-cq/src/test/java/org/apache/geode/internal/cache/ha/CQListGIIDUnitTest.java
index 7a10046..659c4a9 100755
--- a/geode-cq/src/test/java/org/apache/geode/internal/cache/ha/CQListGIIDUnitTest.java
+++ b/geode-cq/src/test/java/org/apache/geode/internal/cache/ha/CQListGIIDUnitTest.java
@@ -186,7 +186,7 @@ public class CQListGIIDUnitTest extends JUnit4DistributedTestCase {
     factory.setScope(Scope.DISTRIBUTED_ACK);
     factory.setDataPolicy(DataPolicy.REPLICATE);
     RegionAttributes attrs = factory.create();
-    // cache.withRegion(regionName, attrs);
+    // cache.createRegion(regionName, attrs);
     createRegion(regions[0], "root", attrs);
     createRegion(regions[1], "root", attrs);
     Thread.sleep(2000);
@@ -672,7 +672,7 @@ public class CQListGIIDUnitTest 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-cq/src/test/java/org/apache/geode/management/CacheServerManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/org/apache/geode/management/CacheServerManagementDUnitTest.java
b/geode-cq/src/test/java/org/apache/geode/management/CacheServerManagementDUnitTest.java
index ae5570f..2cd69dd 100644
--- a/geode-cq/src/test/java/org/apache/geode/management/CacheServerManagementDUnitTest.java
+++ b/geode-cq/src/test/java/org/apache/geode/management/CacheServerManagementDUnitTest.java
@@ -425,7 +425,7 @@ public class CacheServerManagementDUnitTest extends LocatorTestBase {
   }
 
   protected void assertCacheServerConfig(CacheServerMXBean bean) {
-    // assertIndexDetailsEquals(ServerInfo.getInstance().getServerPort(), bean.getServerPort());
+    // assertIndexDetailsEquals(ServerInfo.getInstance().getServerPort(), bean.getPort());
     assertEquals(CacheServer.DEFAULT_BIND_ADDRESS, bean.getBindAddress());
     assertEquals(CacheServer.DEFAULT_HOSTNAME_FOR_CLIENTS, bean.getHostNameForClients());
     assertEquals(CacheServer.DEFAULT_SOCKET_BUFFER_SIZE, bean.getSocketBufferSize());

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-cq/src/test/java/org/apache/geode/security/CQClientAuthDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/org/apache/geode/security/CQClientAuthDUnitTest.java b/geode-cq/src/test/java/org/apache/geode/security/CQClientAuthDUnitTest.java
index 68e4c69..8916725 100644
--- a/geode-cq/src/test/java/org/apache/geode/security/CQClientAuthDUnitTest.java
+++ b/geode-cq/src/test/java/org/apache/geode/security/CQClientAuthDUnitTest.java
@@ -37,8 +37,7 @@ import org.apache.geode.security.templates.UserPasswordAuthInit;
 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;
@@ -56,11 +55,11 @@ public class CQClientAuthDUnitTest extends JUnit4DistributedTestCase {
   final VM client1 = host.getVM(1);
 
   @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")
-          .withProperty(SECURITY_POST_PROCESSOR, TestPostProcessor.class.getName()).buildInThisVM();
+          .withProperty(SECURITY_POST_PROCESSOR, TestPostProcessor.class.getName()).withAutoStart();
 
   @Before
   public void before() throws Exception {
@@ -82,7 +81,7 @@ public class CQClientAuthDUnitTest extends JUnit4DistributedTestCase {
           UserPasswordAuthInit.class.getName() + ".create");
       ClientCacheFactory factory = new ClientCacheFactory(props);
 
-      factory.addPoolServer("localhost", server.getServerPort());
+      factory.addPoolServer("localhost", server.getPort());
       factory.setPoolThreadLocalConnections(false);
       factory.setPoolMinConnections(5);
       factory.setPoolSubscriptionEnabled(true);

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-cq/src/test/java/org/apache/geode/security/CQPDXPostProcessorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/org/apache/geode/security/CQPDXPostProcessorDUnitTest.java
b/geode-cq/src/test/java/org/apache/geode/security/CQPDXPostProcessorDUnitTest.java
index 86d4671..2489b95 100644
--- a/geode-cq/src/test/java/org/apache/geode/security/CQPDXPostProcessorDUnitTest.java
+++ b/geode-cq/src/test/java/org/apache/geode/security/CQPDXPostProcessorDUnitTest.java
@@ -39,8 +39,7 @@ import org.apache.geode.pdx.SimpleClass;
 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.apache.geode.test.junit.runners.CategoryWithParameterizedRunnerFactory;
@@ -75,14 +74,13 @@ public class CQPDXPostProcessorDUnitTest extends JUnit4DistributedTestCase
{
   }
 
   @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")
           .withProperty(SECURITY_POST_PROCESSOR, PDXPostProcessor.class.getName())
           .withProperty("security-pdx", pdxPersistent + "")
-          .withRegion(RegionShortcut.REPLICATE, REGION_NAME).buildInThisVM();
-
+          .withRegion(RegionShortcut.REPLICATE, REGION_NAME);
 
   public CQPDXPostProcessorDUnitTest(boolean pdxPersistent) {
     this.pdxPersistent = pdxPersistent;
@@ -92,7 +90,7 @@ public class CQPDXPostProcessorDUnitTest extends JUnit4DistributedTestCase
{
   public void testCQ() {
     String query = "select * from /" + REGION_NAME;
     client1.invoke(() -> {
-      ClientCache cache = createClientCache("super-user", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("super-user", "1234567", server.getPort());
       Region region = createProxyRegion(cache, REGION_NAME);
 
       Pool pool = PoolManager.find(region);
@@ -121,7 +119,7 @@ public class CQPDXPostProcessorDUnitTest extends JUnit4DistributedTestCase
{
     });
 
     client2.invoke(() -> {
-      ClientCache cache = createClientCache("authRegionUser", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("authRegionUser", "1234567", server.getPort());
       Region region = createProxyRegion(cache, REGION_NAME);
       region.put("key1", new SimpleClass(1, (byte) 1));
       region.put("key2", BYTES);

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-cq/src/test/java/org/apache/geode/security/CQPostProcessorDunitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/org/apache/geode/security/CQPostProcessorDunitTest.java
b/geode-cq/src/test/java/org/apache/geode/security/CQPostProcessorDunitTest.java
index 935c48c..45f45ab 100644
--- a/geode-cq/src/test/java/org/apache/geode/security/CQPostProcessorDunitTest.java
+++ b/geode-cq/src/test/java/org/apache/geode/security/CQPostProcessorDunitTest.java
@@ -37,8 +37,7 @@ import org.apache.geode.cache.query.internal.cq.CqListenerImpl;
 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;
@@ -55,11 +54,11 @@ public class CQPostProcessorDunitTest 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")
-          .withProperty(SECURITY_POST_PROCESSOR, TestPostProcessor.class.getName()).buildInThisVM();
+          .withProperty(SECURITY_POST_PROCESSOR, TestPostProcessor.class.getName()).withAutoStart();
 
   @Before
   public void before() throws Exception {
@@ -74,7 +73,7 @@ public class CQPostProcessorDunitTest extends JUnit4DistributedTestCase
{
   public void testPostProcess() {
     String query = "select * from /AuthRegion";
     client1.invoke(() -> {
-      ClientCache cache = createClientCache("super-user", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("super-user", "1234567", server.getPort());
       Region region = createProxyRegion(cache, REGION_NAME);
 
 
@@ -108,7 +107,7 @@ public class CQPostProcessorDunitTest extends JUnit4DistributedTestCase
{
     });
 
     client2.invoke(() -> {
-      ClientCache cache = createClientCache("authRegionUser", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("authRegionUser", "1234567", server.getPort());
       Region region = createProxyRegion(cache, REGION_NAME);
       region.put("key6", "value6");
     });

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-cq/src/test/java/org/apache/geode/security/ClientQueryAuthDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/org/apache/geode/security/ClientQueryAuthDUnitTest.java
b/geode-cq/src/test/java/org/apache/geode/security/ClientQueryAuthDUnitTest.java
index aea543d..cc5dde4 100644
--- a/geode-cq/src/test/java/org/apache/geode/security/ClientQueryAuthDUnitTest.java
+++ b/geode-cq/src/test/java/org/apache/geode/security/ClientQueryAuthDUnitTest.java
@@ -23,8 +23,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.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -52,16 +51,16 @@ public class ClientQueryAuthDUnitTest 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();
+          .withRegion(RegionShortcut.REPLICATE, REGION_NAME);
 
   @Test
   public void testQuery() {
     client1.invoke(() -> {
-      ClientCache cache = createClientCache("stranger", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("stranger", "1234567", server.getPort());
       final Region region = createProxyRegion(cache, REGION_NAME);
 
       String query = "select * from /AuthRegion";
@@ -77,7 +76,7 @@ public class ClientQueryAuthDUnitTest extends JUnit4DistributedTestCase
{
   public void testCQ() {
     String query = "select * from /AuthRegion";
     client1.invoke(() -> {
-      ClientCache cache = createClientCache("stranger", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("stranger", "1234567", server.getPort());
       Region region = createProxyRegion(cache, REGION_NAME);
       Pool pool = PoolManager.find(region);
       QueryService qs = pool.getQueryService();
@@ -94,7 +93,7 @@ public class ClientQueryAuthDUnitTest extends JUnit4DistributedTestCase
{
     });
 
     client2.invoke(() -> {
-      ClientCache cache = createClientCache("authRegionReader", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("authRegionReader", "1234567", server.getPort());
       Region region = createProxyRegion(cache, REGION_NAME);
       Pool pool = PoolManager.find(region);
       QueryService qs = pool.getQueryService();
@@ -109,7 +108,7 @@ public class ClientQueryAuthDUnitTest extends JUnit4DistributedTestCase
{
     });
 
     client3.invoke(() -> {
-      ClientCache cache = createClientCache("super-user", "1234567", server.getServerPort());
+      ClientCache cache = createClientCache("super-user", "1234567", server.getPort());
       Region region = createProxyRegion(cache, REGION_NAME);
       Pool pool = PoolManager.find(region);
       QueryService qs = pool.getQueryService();

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/QueryNamesOverHttpDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/QueryNamesOverHttpDUnitTest.java
b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/QueryNamesOverHttpDUnitTest.java
index 86deb27..dbd29b5 100644
--- a/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/QueryNamesOverHttpDUnitTest.java
+++ b/geode-web/src/test/java/org/apache/geode/management/internal/cli/commands/QueryNamesOverHttpDUnitTest.java
@@ -23,8 +23,6 @@ import org.apache.geode.management.internal.web.domain.Link;
 import org.apache.geode.management.internal.web.domain.LinkIndex;
 import org.apache.geode.management.internal.web.http.HttpMethod;
 import org.apache.geode.management.internal.web.shell.RestHttpOperationInvoker;
-import org.apache.geode.test.dunit.rules.LocalLocatorStarterRule;
-import org.apache.geode.test.dunit.rules.LocatorStarterBuilder;
 import org.apache.geode.test.dunit.rules.LocatorStarterRule;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.junit.Rule;
@@ -41,7 +39,7 @@ import javax.management.QueryExp;
 @Category(IntegrationTest.class)
 public class QueryNamesOverHttpDUnitTest {
   @Rule
-  public LocalLocatorStarterRule locatorRule = new LocatorStarterBuilder().buildInThisVM();
+  public LocatorStarterRule locatorRule = new LocatorStarterRule().withAutoStart();
 
   @Test
   public void testQueryNameOverHttp() throws Exception {

http://git-wip-us.apache.org/repos/asf/geode/blob/6a88f1bc/geode-web/src/test/java/org/apache/geode/management/internal/security/GfshCommandsOverHttpSecurityTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/org/apache/geode/management/internal/security/GfshCommandsOverHttpSecurityTest.java
b/geode-web/src/test/java/org/apache/geode/management/internal/security/GfshCommandsOverHttpSecurityTest.java
index 7fd839c..25068bc 100644
--- a/geode-web/src/test/java/org/apache/geode/management/internal/security/GfshCommandsOverHttpSecurityTest.java
+++ b/geode-web/src/test/java/org/apache/geode/management/internal/security/GfshCommandsOverHttpSecurityTest.java
@@ -24,7 +24,7 @@ import org.junit.experimental.categories.Category;
 @Category({IntegrationTest.class, SecurityTest.class})
 public class GfshCommandsOverHttpSecurityTest extends GfshCommandsSecurityTest {
   public GfshCommandsOverHttpSecurityTest() {
-    gfshConnection = new GfshShellConnectionRule(serverStarter.getHttpPort(),
+    gfshConnection = new GfshShellConnectionRule(serverStarter::getHttpPort,
         GfshShellConnectionRule.PortType.http);
   }
 }


Mime
View raw message