geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject incubator-geode git commit: GEODE-1467: Rename servlet URLs from gemfire to geode
Date Fri, 05 Aug 2016 16:02:38 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop c7a0a458f -> fd4df9aac


GEODE-1467: Rename servlet URLs from gemfire to geode

* Add a second servlet for each.  This allows both the old and new URL contexts for a time.
* Updated some unit tests to use Parameterized so that both endoints will be tested.
* This closes #227


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/fd4df9aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/fd4df9aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/fd4df9aa

Branch: refs/heads/develop
Commit: fd4df9aac005aabcd585228666a6bc852022924d
Parents: c7a0a45
Author: Kevin J. Duling <kduling@pivotal.io>
Authored: Thu Jul 28 15:07:14 2016 -0700
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Fri Aug 5 09:01:39 2016 -0700

----------------------------------------------------------------------
 ...stAPIOnRegionFunctionExecutionDUnitTest.java | 326 ++++++++++---------
 .../web/controllers/RestAPITestBase.java        |  76 +++--
 .../RestAPIsAndInterOpsDUnitTest.java           |  74 +++--
 ...tAPIsOnGroupsFunctionExecutionDUnitTest.java |  24 +-
 ...APIsOnMembersFunctionExecutionDUnitTest.java | 108 +++---
 .../controllers/RestAPIsWithSSLDUnitTest.java   |  89 +++--
 .../management/internal/ManagementAgent.java    |   4 +
 .../gemfire/management/internal/RestAgent.java  |  20 +-
 .../main/webapp/WEB-INF/gemfire-api-servlet.xml |  85 -----
 .../src/main/webapp/WEB-INF/geode-servlet.xml   |  85 +++++
 geode-web-api/src/main/webapp/WEB-INF/web.xml   |   4 +-
 .../src/main/webapp/WEB-INF/gemfire-servlet.xml |  59 ----
 .../main/webapp/WEB-INF/geode-mgmt-servlet.xml  |  59 ++++
 geode-web/src/main/webapp/WEB-INF/web.xml       |   4 +-
 .../ConnectCommandWithHttpAndSSLDUnitTest.java  |  20 +-
 15 files changed, 577 insertions(+), 460 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
index d384fef..62ddb35 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
@@ -16,17 +16,31 @@
  */
 package com.gemstone.gemfire.rest.internal.web.controllers;
 
-import org.junit.experimental.categories.Category;
-import org.junit.Test;
-
 import static org.junit.Assert.*;
 
-import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
-import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
-import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache.execute.FunctionContext;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
@@ -38,149 +52,35 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionTestHelper;
 import com.gemstone.gemfire.rest.internal.web.RestFunctionTemplate;
 import com.gemstone.gemfire.test.dunit.VM;
-import org.apache.http.client.methods.CloseableHttpResponse;
-
-import java.io.Serializable;
-import java.util.*;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
 
 /**
  * Dunit Test to validate OnRegion function execution with REST APIs
- *
  * @since GemFire 8.0
  */
 
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
+@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
 public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
 
   private final String REPLICATE_REGION_NAME = "sampleRRegion";
 
   private final String PR_REGION_NAME = "samplePRRegion";
 
+  @Parameterized.Parameter
+  public String urlContext;
+
+  @Parameterized.Parameters
+  public static Collection<String> data() {
+    return Arrays.asList("/geode", "/gemfire-api");
+  }
+
   public RestAPIOnRegionFunctionExecutionDUnitTest() {
     super();
   }
 
-  private class SampleFunction extends RestFunctionTemplate {
-    public static final String Id = "SampleFunction";
-
-    @Override
-    public void execute(FunctionContext context) {
-      invocationCount++;
-      if (context instanceof RegionFunctionContext) {
-        RegionFunctionContext rfContext = (RegionFunctionContext) context;
-        rfContext.getDataSet().getCache().getLogger()
-            .info("Executing function :  SampleFunction.execute(hasResult=true) with filter: " + rfContext.getFilter() + "  " + rfContext);
-        if (rfContext.getArguments() instanceof Boolean) {
-          /* return rfContext.getArguments(); */
-          if (hasResult()) {
-            rfContext.getResultSender().lastResult(
-                (Serializable) rfContext.getArguments());
-          } else {
-            rfContext
-                .getDataSet()
-                .getCache()
-                .getLogger()
-                .info(
-                    "Executing function :  SampleFunction.execute(hasResult=false) " + rfContext);
-            while (true && !rfContext.getDataSet().isDestroyed()) {
-              rfContext.getDataSet().getCache().getLogger()
-                  .info("For Bug43513 ");
-              try {
-                Thread.sleep(100);
-              } catch (InterruptedException ie) {
-                Thread.currentThread().interrupt();
-                return;
-              }
-            }
-          }
-        } else if (rfContext.getArguments() instanceof String) {
-          String key = (String) rfContext.getArguments();
-          if (key.equals("TestingTimeOut")) { // for test
-            // PRFunctionExecutionDUnitTest#testRemoteMultiKeyExecution_timeout
-            try {
-              Thread.sleep(2000);
-            } catch (InterruptedException e) {
-              rfContext.getDataSet().getCache().getLogger()
-                  .warning("Got Exception : Thread Interrupted" + e);
-            }
-          }
-          if (PartitionRegionHelper.isPartitionedRegion(rfContext.getDataSet())) {
-            /*
-             * return
-             * (Serializable)PartitionRegionHelper.getLocalDataForContext(
-             * rfContext).get(key);
-             */
-            rfContext.getResultSender().lastResult(
-                (Serializable) PartitionRegionHelper.getLocalDataForContext(
-                    rfContext).get(key));
-          } else {
-            rfContext.getResultSender().lastResult(
-                (Serializable) rfContext.getDataSet().get(key));
-          }
-          /* return (Serializable)rfContext.getDataSet().get(key); */
-        } else if (rfContext.getArguments() instanceof Set) {
-          Set origKeys = (Set) rfContext.getArguments();
-          ArrayList vals = new ArrayList();
-          for (Object key : origKeys) {
-            Object val = PartitionRegionHelper
-                .getLocalDataForContext(rfContext).get(key);
-            if (val != null) {
-              vals.add(val);
-            }
-          }
-          rfContext.getResultSender().lastResult(vals);
-          /* return vals; */
-        } else if (rfContext.getArguments() instanceof HashMap) {
-          HashMap putData = (HashMap) rfContext.getArguments();
-          for (Iterator i = putData.entrySet().iterator(); i.hasNext(); ) {
-            Map.Entry me = (Map.Entry) i.next();
-            rfContext.getDataSet().put(me.getKey(), me.getValue());
-          }
-          rfContext.getResultSender().lastResult(Boolean.TRUE);
-        } else {
-          rfContext.getResultSender().lastResult(Boolean.FALSE);
-        }
-      } else {
-        if (hasResult()) {
-          context.getResultSender().lastResult(Boolean.FALSE);
-        } else {
-          DistributedSystem ds = InternalDistributedSystem.getAnyInstance();
-          LogWriter logger = ds.getLogWriter();
-          logger.info("Executing in SampleFunction on Server : "
-              + ds.getDistributedMember() + "with Context : " + context);
-          while (ds.isConnected()) {
-            logger
-                .fine("Just executing function in infinite loop for Bug43513");
-            try {
-              Thread.sleep(250);
-            } catch (InterruptedException e) {
-              return;
-            }
-          }
-        }
-      }
-    }
-
-    @Override
-    public String getId() {
-      return Id;
-    }
-
-    @Override
-    public boolean hasResult() {
-      return true;
-    }
-
-    @Override
-    public boolean optimizeForWrite() {
-      return true;
-    }
-
-    @Override
-    public boolean isHA() {
-      return false;
-    }
-  }
 
   private void createPeer(DataPolicy policy) {
     AttributesFactory factory = new AttributesFactory();
@@ -192,8 +92,7 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
   }
 
   private boolean createPeerWithPR() {
-    RegionAttributes ra = PartitionedRegionTestHelper.createRegionAttrsForPR(0,
-        10);
+    RegionAttributes ra = PartitionedRegionTestHelper.createRegionAttrsForPR(0, 10);
     AttributesFactory raf = new AttributesFactory(ra);
     PartitionAttributesImpl pa = new PartitionAttributesImpl();
     pa.setAll(ra.getPartitionAttributes());
@@ -211,8 +110,7 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
     DistributedSystem.setThreadsSocketPolicy(false);
 
     for (int i = (pr.getTotalNumberOfBuckets() * 3); i > 0; i--) {
-      Integer val = new Integer(i + 1);
-      pr.put("execKey-" + i, val);
+      pr.put("execKey-" + i, i + 1);
     }
     // Assert there is data in each bucket
     for (int bid = 0; bid < pr.getTotalNumberOfBuckets(); bid++) {
@@ -229,9 +127,8 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
       testKeys.add("execKey-" + i);
     }
     int j = 0;
-    for (Iterator i = testKeys.iterator(); i.hasNext(); ) {
-      Integer val = new Integer(j++);
-      region.put(i.next(), val);
+    for (final Object testKey : testKeys) {
+      region.put(testKey, j++);
     }
 
   }
@@ -242,10 +139,14 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
   }
 
   private void createCacheAndRegisterFunction() {
-    restURLs.add(vm0.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm0.getHost().getHostName(), null)));
-    restURLs.add(vm1.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm1.getHost().getHostName(), null)));
-    restURLs.add(vm2.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm2.getHost().getHostName(), null)));
-    restURLs.add(vm3.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm3.getHost().getHostName(), null)));
+    restURLs.add(vm0.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm0.getHost()
+                                                                                    .getHostName(), null, urlContext)));
+    restURLs.add(vm1.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm1.getHost()
+                                                                                    .getHostName(), null, urlContext)));
+    restURLs.add(vm2.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm2.getHost()
+                                                                                    .getHostName(), null, urlContext)));
+    restURLs.add(vm3.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm3.getHost()
+                                                                                    .getHostName(), null, urlContext)));
 
     vm0.invoke("registerFunction(new SampleFunction())", () -> FunctionService.registerFunction(new SampleFunction()));
     vm1.invoke("registerFunction(new SampleFunction())", () -> FunctionService.registerFunction(new SampleFunction()));
@@ -309,8 +210,8 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
   }
 
   private void createPeersWithPR(VM... vms) {
-    for (int i = 0; i < vms.length; i++) {
-      vms[i].invoke("createPeerWithPR", () -> createPeerWithPR());
+    for (final VM vm : vms) {
+      vm.invoke("createPeerWithPR", () -> createPeerWithPR());
     }
   }
 
@@ -322,14 +223,7 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
 
     vm3.invoke("populatePRRegion", () -> populatePRRegion());
 
-    String jsonBody = "["
-        + "{\"@type\": \"double\",\"@value\": 210}"
-        + ",{\"@type\":\"com.gemstone.gemfire.rest.internal.web.controllers.Item\","
-        + "\"itemNo\":\"599\",\"description\":\"Part X Free on Bumper Offer\","
-        + "\"quantity\":\"2\","
-        + "\"unitprice\":\"5\","
-        + "\"totalprice\":\"10.00\"}"
-        + "]";
+    String jsonBody = "[" + "{\"@type\": \"double\",\"@value\": 210}" + ",{\"@type\":\"com.gemstone.gemfire.rest.internal.web.controllers.Item\"," + "\"itemNo\":\"599\",\"description\":\"Part X Free on Bumper Offer\"," + "\"quantity\":\"2\"," + "\"unitprice\":\"5\"," + "\"totalprice\":\"10.00\"}" + "]";
 
     CloseableHttpResponse response = executeFunctionThroughRestCall("SampleFunction", PR_REGION_NAME, null, jsonBody, null, null);
     assertEquals(200, response.getStatusLine().getStatusCode());
@@ -338,14 +232,7 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
     // Assert that only 1 node has executed the function.
     assertCorrectInvocationCount(4, vm0, vm1, vm2, vm3);
 
-    jsonBody = "["
-        + "{\"@type\": \"double\",\"@value\": 220}"
-        + ",{\"@type\":\"com.gemstone.gemfire.rest.internal.web.controllers.Item\","
-        + "\"itemNo\":\"609\",\"description\":\"Part X Free on Bumper Offer\","
-        + "\"quantity\":\"3\","
-        + "\"unitprice\":\"9\","
-        + "\"totalprice\":\"12.00\"}"
-        + "]";
+    jsonBody = "[" + "{\"@type\": \"double\",\"@value\": 220}" + ",{\"@type\":\"com.gemstone.gemfire.rest.internal.web.controllers.Item\"," + "\"itemNo\":\"609\",\"description\":\"Part X Free on Bumper Offer\"," + "\"quantity\":\"3\"," + "\"unitprice\":\"9\"," + "\"totalprice\":\"12.00\"}" + "]";
 
     resetInvocationCounts(vm0, vm1, vm2, vm3);
 
@@ -359,4 +246,119 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
     restURLs.clear();
   }
 
+  private class SampleFunction extends RestFunctionTemplate {
+
+    public static final String Id = "SampleFunction";
+
+    @Override
+    public void execute(FunctionContext context) {
+      invocationCount++;
+      if (context instanceof RegionFunctionContext) {
+        RegionFunctionContext rfContext = (RegionFunctionContext) context;
+        rfContext.getDataSet()
+                 .getCache()
+                 .getLogger()
+                 .info("Executing function :  SampleFunction.execute(hasResult=true) with filter: " + rfContext.getFilter() + "  " + rfContext);
+        if (rfContext.getArguments() instanceof Boolean) {
+          /* return rfContext.getArguments(); */
+          if (hasResult()) {
+            rfContext.getResultSender().lastResult((Serializable) rfContext.getArguments());
+          } else {
+            rfContext.getDataSet()
+                     .getCache()
+                     .getLogger()
+                     .info("Executing function :  SampleFunction.execute(hasResult=false) " + rfContext);
+            while (!rfContext.getDataSet().isDestroyed()) {
+              rfContext.getDataSet().getCache().getLogger().info("For Bug43513 ");
+              try {
+                Thread.sleep(100);
+              } catch (InterruptedException ie) {
+                Thread.currentThread().interrupt();
+                return;
+              }
+            }
+          }
+        } else if (rfContext.getArguments() instanceof String) {
+          String key = (String) rfContext.getArguments();
+          if (key.equals("TestingTimeOut")) { // for test
+            // PRFunctionExecutionDUnitTest#testRemoteMultiKeyExecution_timeout
+            try {
+              Thread.sleep(2000);
+            } catch (InterruptedException e) {
+              rfContext.getDataSet().getCache().getLogger().warning("Got Exception : Thread Interrupted" + e);
+            }
+          }
+          if (PartitionRegionHelper.isPartitionedRegion(rfContext.getDataSet())) {
+            /*
+             * return
+             * (Serializable)PartitionRegionHelper.getLocalDataForContext(
+             * rfContext).get(key);
+             */
+            rfContext.getResultSender()
+                     .lastResult((Serializable) PartitionRegionHelper.getLocalDataForContext(rfContext).get(key));
+          } else {
+            rfContext.getResultSender().lastResult((Serializable) rfContext.getDataSet().get(key));
+          }
+          /* return (Serializable)rfContext.getDataSet().get(key); */
+        } else if (rfContext.getArguments() instanceof Set) {
+          Set origKeys = (Set) rfContext.getArguments();
+          ArrayList vals = new ArrayList();
+          for (Object key : origKeys) {
+            Object val = PartitionRegionHelper.getLocalDataForContext(rfContext).get(key);
+            if (val != null) {
+              vals.add(val);
+            }
+          }
+          rfContext.getResultSender().lastResult(vals);
+          /* return vals; */
+        } else if (rfContext.getArguments() instanceof HashMap) {
+          HashMap putData = (HashMap) rfContext.getArguments();
+          for (Iterator i = putData.entrySet().iterator(); i.hasNext(); ) {
+            Map.Entry me = (Map.Entry) i.next();
+            rfContext.getDataSet().put(me.getKey(), me.getValue());
+          }
+          rfContext.getResultSender().lastResult(Boolean.TRUE);
+        } else {
+          rfContext.getResultSender().lastResult(Boolean.FALSE);
+        }
+      } else {
+        if (hasResult()) {
+          context.getResultSender().lastResult(Boolean.FALSE);
+        } else {
+          DistributedSystem ds = InternalDistributedSystem.getAnyInstance();
+          LogWriter logger = ds.getLogWriter();
+          logger.info("Executing in SampleFunction on Server : " + ds.getDistributedMember() + "with Context : " + context);
+          while (ds.isConnected()) {
+            logger.fine("Just executing function in infinite loop for Bug43513");
+            try {
+              Thread.sleep(250);
+            } catch (InterruptedException e) {
+              return;
+            }
+          }
+        }
+      }
+    }
+
+    @Override
+    public String getId() {
+      return Id;
+    }
+
+    @Override
+    public boolean hasResult() {
+      return true;
+    }
+
+    @Override
+    public boolean optimizeForWrite() {
+      return true;
+    }
+
+    @Override
+    public boolean isHA() {
+      return false;
+    }
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
index e61743a..de48cf9 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
@@ -56,14 +56,14 @@ import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 
 @Category(DistributedTest.class)
-public class RestAPITestBase extends JUnit4DistributedTestCase {
+class RestAPITestBase extends JUnit4DistributedTestCase {
 
   protected Cache cache = null;
-  protected List<String> restURLs = new ArrayList();
-  protected VM vm0 = null;
-  protected VM vm1 = null;
-  protected VM vm2 = null;
-  protected VM vm3 = null;
+  List<String> restURLs = new ArrayList<>();
+  VM vm0 = null;
+  VM vm1 = null;
+  VM vm2 = null;
+  VM vm3 = null;
 
   @Override
   public final void postSetUp() throws Exception {
@@ -83,7 +83,7 @@ public class RestAPITestBase extends JUnit4DistributedTestCase {
     postSetUpRestAPITestBase();
   }
 
-  protected void postSetUpRestAPITestBase() throws Exception {
+  private void postSetUpRestAPITestBase() throws Exception {
   }
 
   /**
@@ -107,7 +107,7 @@ public class RestAPITestBase extends JUnit4DistributedTestCase {
     }
   }
 
-  public String createCacheWithGroups(final String hostName, final String groups) {
+  String createCacheWithGroups(final String hostName, final String groups, final String context) {
     RestAPITestBase test = new RestAPITestBase();
 
     final int servicePort = AvailablePortHelper.getRandomAvailableTCPPort();
@@ -125,17 +125,20 @@ public class RestAPITestBase extends JUnit4DistributedTestCase {
     InternalDistributedSystem ds = test.getSystem(props);
     cache = CacheFactory.create(ds);
 
-    String restEndPoint = "http://" + hostName + ":" + servicePort + "/gemfire-api/v1";
-    return restEndPoint;
+    return "http://" + hostName + ":" + servicePort + context + "/v1";
   }
 
-  protected int getInvocationCount() {
+  private int getInvocationCount() {
     RestFunctionTemplate function = (RestFunctionTemplate) FunctionService.getFunction(getFunctionID());
     return function.invocationCount;
   }
 
-  protected CloseableHttpResponse executeFunctionThroughRestCall(String function, String regionName, String filter, String jsonBody, String groups,
-                                                                 String members) {
+  CloseableHttpResponse executeFunctionThroughRestCall(String function,
+                                                       String regionName,
+                                                       String filter,
+                                                       String jsonBody,
+                                                       String groups,
+                                                       String members) {
     System.out.println("Entering executeFunctionThroughRestCall");
     CloseableHttpResponse value = null;
     try {
@@ -153,20 +156,24 @@ public class RestAPITestBase extends JUnit4DistributedTestCase {
     return value;
   }
 
-  private HttpPost createHTTPPost(String function, String regionName, String filter, int restUrlIndex, String groups, String members, String jsonBody) {
+  private HttpPost createHTTPPost(String function,
+                                  String regionName,
+                                  String filter,
+                                  int restUrlIndex,
+                                  String groups,
+                                  String members,
+                                  String jsonBody) {
     StringBuilder restURLBuilder = new StringBuilder();
-    restURLBuilder.append(restURLs.get(restUrlIndex) + "/functions/" + function+"?");
+    restURLBuilder.append(restURLs.get(restUrlIndex)).append("/functions/").append(function).append("?");
     if (regionName != null && !regionName.isEmpty()) {
-      restURLBuilder.append("onRegion=" + regionName);
-    }
-    else if (groups != null && !groups.isEmpty()) {
-      restURLBuilder.append("onGroups=" + groups);
-    }
-    else if (members != null && !members.isEmpty()) {
-      restURLBuilder.append("onMembers=" + members);
+      restURLBuilder.append("onRegion=").append(regionName);
+    } else if (groups != null && !groups.isEmpty()) {
+      restURLBuilder.append("onGroups=").append(groups);
+    } else if (members != null && !members.isEmpty()) {
+      restURLBuilder.append("onMembers=").append(members);
     }
     if (filter != null && !filter.isEmpty()) {
-      restURLBuilder.append("&filter=" + filter);
+      restURLBuilder.append("&filter=").append(filter);
     }
     String restString = restURLBuilder.toString();
     HttpPost post = new HttpPost(restString);
@@ -183,7 +190,7 @@ public class RestAPITestBase extends JUnit4DistributedTestCase {
     throw new RuntimeException("This method should be overridden");
   }
 
-  protected void assertHttpResponse(CloseableHttpResponse response, int httpCode, int expectedServerResponses) {
+  void assertHttpResponse(CloseableHttpResponse response, int httpCode, int expectedServerResponses) {
     assertEquals(httpCode, response.getStatusLine().getStatusCode());
 
     //verify response has body flag, expected is true.
@@ -204,10 +211,9 @@ public class RestAPITestBase extends JUnit4DistributedTestCase {
     try {
       HttpEntity entity = response.getEntity();
       InputStream content = entity.getContent();
-      BufferedReader reader = new BufferedReader(new InputStreamReader(
-              content));
+      BufferedReader reader = new BufferedReader(new InputStreamReader(content));
       String line;
-      StringBuffer sb = new StringBuffer();
+      StringBuilder sb = new StringBuilder();
       while ((line = reader.readLine()) != null) {
         sb.append(line);
       }
@@ -218,22 +224,22 @@ public class RestAPITestBase extends JUnit4DistributedTestCase {
     return "";
   }
 
-  protected void assertCorrectInvocationCount(int expectedInvocationCount, VM... vms) {
+  void assertCorrectInvocationCount(int expectedInvocationCount, VM... vms) {
     int count = 0;
-    for (int i = 0; i < vms.length; i++) {
-      count += vms[i].invoke("getInvocationCount",() -> getInvocationCount());
+    for (final VM vm : vms) {
+      count += vm.invoke("getInvocationCount", () -> getInvocationCount());
     }
-    assertEquals(expectedInvocationCount,count);
+    assertEquals(expectedInvocationCount, count);
   }
 
-  protected void resetInvocationCount() {
+  private void resetInvocationCount() {
     RestFunctionTemplate f = (RestFunctionTemplate) FunctionService.getFunction(getFunctionID());
     f.invocationCount = 0;
   }
 
-  protected void resetInvocationCounts(VM... vms) {
-    for (int i = 0; i < vms.length; i++) {
-      vms[i].invoke("resetInvocationCount", () -> resetInvocationCount());
+  void resetInvocationCounts(VM... vms) {
+    for (final VM vm : vms) {
+      vm.invoke("resetInvocationCount", () -> resetInvocationCount());
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
index 837aebe..09410d3 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
@@ -16,14 +16,46 @@
  */
 package com.gemstone.gemfire.rest.internal.web.controllers;
 
-import org.junit.experimental.categories.Category;
-import org.junit.Test;
-
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
 import static org.junit.Assert.*;
 
-import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
 
-import com.gemstone.gemfire.cache.*;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpDelete;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionFactory;
@@ -40,23 +72,8 @@ import com.gemstone.gemfire.pdx.PdxInstance;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
-import org.apache.http.HttpEntity;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.methods.*;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.*;
-
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
 
 /**
  * Dunit Test containing inter - operations between REST Client and Gemfire cache client
@@ -65,10 +82,20 @@ import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
  */
 
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
+@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
 public class RestAPIsAndInterOpsDUnitTest extends LocatorTestBase {
 
   private static final long serialVersionUID = -254776154266339226L;
 
+  @Parameterized.Parameter
+  public String urlContext;
+
+  @Parameterized.Parameters
+  public static Collection<String> data() {
+    return Arrays.asList("/geode", "/gemfire-api");
+  }
+
   private ManagementTestBase helper;
 
   public static final String PEOPLE_REGION_NAME = "People";
@@ -178,8 +205,7 @@ public class RestAPIsAndInterOpsDUnitTest extends LocatorTestBase {
     //create Cache of given VM and start HTTP service with REST APIs service
     startBridgeServer(hostName, serverPort, groups, locators, regions, probe);
 
-    String restEndPoint = "http://" + hostName + ":" + serverPort + "/gemfire-api/v1";
-    return restEndPoint;
+    return "http://" + hostName + ":" + serverPort + urlContext + "/v1";
   }
 
   @SuppressWarnings("deprecation")

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
index 33faf9a..a3a2a10 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
@@ -19,11 +19,15 @@ package com.gemstone.gemfire.rest.internal.web.controllers;
 import static org.junit.Assert.*;
 
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.Collections;
 
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import com.gemstone.gemfire.cache.execute.FunctionContext;
 import com.gemstone.gemfire.cache.execute.FunctionService;
@@ -31,19 +35,31 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.rest.internal.web.RestFunctionTemplate;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
 
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
+@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
 public class RestAPIsOnGroupsFunctionExecutionDUnitTest extends RestAPITestBase {
 
+  @Parameterized.Parameter
+  public String urlContext;
+
+  @Parameterized.Parameters
+  public static Collection<String> data() {
+    return Arrays.asList("/geode", "/gemfire-api");
+  }
+
+
   @Override
   protected String getFunctionID() {
     return OnGroupsFunction.Id;
   }
 
   private void setupCacheWithGroupsAndFunction() {
-    restURLs.add(vm0.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm0.getHost().getHostName(), "g0,gm")));
-    restURLs.add(vm1.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm1.getHost().getHostName(), "g1")));
-    restURLs.add(vm2.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm2.getHost().getHostName(), "g0,g1")));
+    restURLs.add(vm0.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm0.getHost().getHostName(), "g0,gm", urlContext)));
+    restURLs.add(vm1.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm1.getHost().getHostName(), "g1", urlContext)));
+    restURLs.add(vm2.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm2.getHost().getHostName(), "g0,g1", urlContext)));
 
     vm0.invoke("registerFunction(new OnGroupsFunction())", () -> FunctionService.registerFunction(new OnGroupsFunction()));
     vm1.invoke("registerFunction(new OnGroupsFunction())", () -> FunctionService.registerFunction(new OnGroupsFunction()));
@@ -103,7 +119,7 @@ public class RestAPIsOnGroupsFunctionExecutionDUnitTest extends RestAPITestBase
   }
 
   private class OnGroupsFunction extends RestFunctionTemplate {
-    public static final String Id = "OnGroupsFunction";
+    static final String Id = "OnGroupsFunction";
 
     @Override
     public void execute(FunctionContext context) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
index a71bb39..ad431f9 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
@@ -18,11 +18,15 @@ package com.gemstone.gemfire.rest.internal.web.controllers;
 
 import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
 
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.Properties;
 
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheClosedException;
@@ -31,42 +35,21 @@ import com.gemstone.gemfire.cache.execute.FunctionContext;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.rest.internal.web.RestFunctionTemplate;
-import com.gemstone.gemfire.test.junit.categories.*;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
 
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
+@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
 public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase {
 
-  private class OnMembersFunction extends RestFunctionTemplate {
-    public static final String Id = "OnMembersFunction";
-
-    @Override
-    public void execute(FunctionContext context) {
-
-      System.out.println("SWAP:1:executing OnMembersFunction:" + invocationCount);
-      invocationCount++;
-
-      context.getResultSender().lastResult(Boolean.TRUE);
-    }
-
-    @Override
-    public String getId() {
-      return Id;
-    }
+  @Parameterized.Parameter
+  public String urlContext;
 
-    @Override
-    public boolean hasResult() {
-      return true;
-    }
-
-    @Override
-    public boolean optimizeForWrite() {
-      return false;
-    }
-
-    @Override
-    public boolean isHA() {
-      return false;
-    }
+  @Parameterized.Parameters
+  public static Collection<String> data() {
+    return Arrays.asList("/geode", "/gemfire-api");
   }
 
   private String createCacheAndRegisterFunction(String hostName, String memberName) {
@@ -82,14 +65,13 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
     try {
       c = CacheFactory.getInstance(new RestAPIsOnMembersFunctionExecutionDUnitTest().getSystem(props));
       c.close();
-    } catch (CacheClosedException cce) {
+    } catch (CacheClosedException ignore) {
     }
 
     c = CacheFactory.create(new RestAPIsOnMembersFunctionExecutionDUnitTest().getSystem(props));
     FunctionService.registerFunction(new OnMembersFunction());
 
-    String restEndPoint = "http://" + hostName + ":" + servicePort + "/gemfire-api/v1";
-    return restEndPoint;
+    return "http://" + hostName + ":" + servicePort + urlContext + "/v1";
 
   }
 
@@ -104,20 +86,24 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
     createCacheForVMs();
 
     for (int i = 0; i < 10; i++) {
-      CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction",null,null,null,null,null);
+      CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction", null, null, null, null, null);
       assertHttpResponse(response, 200, 4);
     }
 
-    assertCorrectInvocationCount(40,vm0,vm1,vm2,vm3);
+    assertCorrectInvocationCount(40, vm0, vm1, vm2, vm3);
 
     restURLs.clear();
   }
 
   private void createCacheForVMs() {
-    restURLs.add(vm0.invoke("createCacheAndRegisterFunction",() -> createCacheAndRegisterFunction(vm0.getHost().getHostName(), "m1")));
-    restURLs.add(vm1.invoke("createCacheAndRegisterFunction",() -> createCacheAndRegisterFunction(vm1.getHost().getHostName(), "m2")));
-    restURLs.add(vm2.invoke("createCacheAndRegisterFunction",() -> createCacheAndRegisterFunction(vm2.getHost().getHostName(), "m3")));
-    restURLs.add(vm3.invoke("createCacheAndRegisterFunction",() -> createCacheAndRegisterFunction(vm3.getHost().getHostName(), "m4")));
+    restURLs.add(vm0.invoke("createCacheAndRegisterFunction", () -> createCacheAndRegisterFunction(vm0.getHost()
+                                                                                                      .getHostName(), "m1")));
+    restURLs.add(vm1.invoke("createCacheAndRegisterFunction", () -> createCacheAndRegisterFunction(vm1.getHost()
+                                                                                                      .getHostName(), "m2")));
+    restURLs.add(vm2.invoke("createCacheAndRegisterFunction", () -> createCacheAndRegisterFunction(vm2.getHost()
+                                                                                                      .getHostName(), "m3")));
+    restURLs.add(vm3.invoke("createCacheAndRegisterFunction", () -> createCacheAndRegisterFunction(vm3.getHost()
+                                                                                                      .getHostName(), "m4")));
   }
 
   @Test
@@ -125,11 +111,11 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
     createCacheForVMs();
 
     for (int i = 0; i < 10; i++) {
-      CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction",null,null,null,null,"m1,m2,m3");
+      CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction", null, null, null, null, "m1,m2,m3");
       assertHttpResponse(response, 200, 3);
     }
 
-    assertCorrectInvocationCount(30,vm0,vm1,vm2,vm3);
+    assertCorrectInvocationCount(30, vm0, vm1, vm2, vm3);
 
     restURLs.clear();
   }
@@ -139,13 +125,47 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
     createCacheForVMs();
 
     for (int i = 0; i < 10; i++) {
-      CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction",null,"key2",null,null,"m1,m2,m3");
+      CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction", null, "key2", null, null, "m1,m2,m3");
       assertHttpResponse(response, 500, 0);
     }
 
-    assertCorrectInvocationCount(0,vm0,vm1,vm2,vm3);
+    assertCorrectInvocationCount(0, vm0, vm1, vm2, vm3);
 
     restURLs.clear();
   }
 
+  private class OnMembersFunction extends RestFunctionTemplate {
+
+    public static final String Id = "OnMembersFunction";
+
+    @Override
+    public void execute(FunctionContext context) {
+
+      System.out.println("SWAP:1:executing OnMembersFunction:" + invocationCount);
+      invocationCount++;
+
+      context.getResultSender().lastResult(Boolean.TRUE);
+    }
+
+    @Override
+    public String getId() {
+      return Id;
+    }
+
+    @Override
+    public boolean hasResult() {
+      return true;
+    }
+
+    @Override
+    public boolean optimizeForWrite() {
+      return false;
+    }
+
+    @Override
+    public boolean isHA() {
+      return false;
+    }
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
index f01ab4b..daa781d 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
@@ -16,14 +16,48 @@
  */
 package com.gemstone.gemfire.rest.internal.web.controllers;
 
-import org.junit.experimental.categories.Category;
-import org.junit.Test;
-
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
 import static org.junit.Assert.*;
 
-import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.BindException;
+import java.security.KeyStore;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.net.ssl.SSLContext;
 
-import com.gemstone.gemfire.cache.*;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.conn.ssl.SSLContexts;
+import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.json.JSONObject;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@ -39,39 +73,31 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
 import com.gemstone.gemfire.util.test.TestUtil;
-import org.apache.http.HttpEntity;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
-import org.apache.http.conn.ssl.SSLContexts;
-import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.json.JSONObject;
-
-import javax.net.ssl.SSLContext;
-import java.io.*;
-import java.net.BindException;
-import java.security.KeyStore;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
 
 /**
  * 
  * @since GemFire 8.0
  */
 @Category(DistributedTest.class)
+@RunWith(Parameterized.class)
+@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
 public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
 
   private static final long serialVersionUID = -254776154266339226L;
 
   private final String PEOPLE_REGION_NAME = "People";
 
+  @Parameterized.Parameter
+  public String urlContext;
+
+  @Parameterized.Parameters
+  public static Collection<String> data() {
+    return Arrays.asList("/geode", "/gemfire-api");
+  }
+
   private File jks;
 
   public RestAPIsWithSSLDUnitTest() {
@@ -131,7 +157,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
       e.printStackTrace();
     }
     remoteObjects.put(CACHE_KEY, cache);
-    return new Integer(server.getPort());
+    return server.getPort();
   }
 
   public void doPutsInClientCache() {
@@ -161,8 +187,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
 
     region.putAll(userMap);
 
-    if (clientCache != null)
-      clientCache.getLogger().info("Gemfire Cache Client: Puts successfully done");
+    clientCache.getLogger().info("Gemfire Cache Client: Puts successfully done");
 
   }
 
@@ -193,7 +218,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
       final String hostName = server.getHost().getHostName();
       final int restServicePort = AvailablePortHelper.getRandomAvailableTCPPort();
       startBridgeServer(hostName, restServicePort, locators, new String[] { REGION_NAME }, sslProperties, clusterLevel);
-      return "https://" + hostName + ":" + restServicePort + "/gemfire-api/v1";
+      return "https://" + hostName + ":" + restServicePort + urlContext + "/v1";
     });
 
     // create a client cache
@@ -366,9 +391,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
     SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext,
         SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
 
-    CloseableHttpClient httpclient = HttpClients.custom().setSSLSocketFactory(sslsf).build();
-
-    return httpclient;
+    return HttpClients.custom().setSSLSocketFactory(sslsf).build();
   }
 
   private void validateConnection(String restEndpoint, String algo) {
@@ -388,7 +411,7 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
         InputStream content = entity.getContent();
         BufferedReader reader = new BufferedReader(new InputStreamReader(content));
         String line;
-        StringBuffer str = new StringBuffer();
+        StringBuilder str = new StringBuilder();
         while ((line = reader.readLine()) != null) {
           str.append(line);
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
index f2bcf3b..1e23279 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
@@ -234,6 +234,8 @@ public class ManagementAgent {
           if (agentUtil.isWebApplicationAvailable(gemfireWar)) {
             this.httpServer = JettyHelper
                 .addWebApplication(this.httpServer, "/gemfire", gemfireWar);
+            this.httpServer = JettyHelper
+                .addWebApplication(this.httpServer, "/geode-mgmt", gemfireWar);
           }
 
           if (agentUtil.isWebApplicationAvailable(pulseWar)) {
@@ -242,6 +244,8 @@ public class ManagementAgent {
 
           if (isServer && this.config.getStartDevRestApi()) {
             if (agentUtil.isWebApplicationAvailable(gemfireAPIWar)) {
+              this.httpServer = JettyHelper.addWebApplication(this.httpServer, "/geode",
+                  gemfireAPIWar);
               this.httpServer = JettyHelper.addWebApplication(this.httpServer, "/gemfire-api",
                   gemfireAPIWar);
               isRestWebAppAdded = true;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
index 8b41548..9773eca 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
@@ -17,7 +17,18 @@
 
 package com.gemstone.gemfire.management.internal;
 
-import com.gemstone.gemfire.cache.*;
+import java.net.UnknownHostException;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.logging.log4j.Logger;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+
+import com.gemstone.gemfire.cache.AttributesFactory;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DataPolicy;
+import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.GemFireVersion;
 import com.gemstone.gemfire.internal.SocketCreator;
@@ -25,12 +36,6 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.management.ManagementService;
-import org.apache.commons.lang.StringUtils;
-import org.apache.logging.log4j.Logger;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.ServerConnector;
-
-import java.net.UnknownHostException;
 
 /**
  * Agent implementation that controls the HTTP server end points used for REST
@@ -133,6 +138,7 @@ public class RestAgent {
             this.config.getHttpServiceSSLProperties());
 
         this.httpServer = JettyHelper.addWebApplication(httpServer, "/gemfire-api", gemfireAPIWar);
+        this.httpServer = JettyHelper.addWebApplication(httpServer, "/geode", gemfireAPIWar);
 
         if (logger.isDebugEnabled()) {
           logger.info("Starting HTTP embedded server on port ({}) at bind-address ({})...",

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-web-api/src/main/webapp/WEB-INF/gemfire-api-servlet.xml
----------------------------------------------------------------------
diff --git a/geode-web-api/src/main/webapp/WEB-INF/gemfire-api-servlet.xml b/geode-web-api/src/main/webapp/WEB-INF/gemfire-api-servlet.xml
deleted file mode 100644
index e96acb0..0000000
--- a/geode-web-api/src/main/webapp/WEB-INF/gemfire-api-servlet.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xmlns:mvc="http://www.springframework.org/schema/mvc"
-       xmlns:oxm="http://www.springframework.org/schema/oxm"
-       xmlns:p="http://www.springframework.org/schema/p"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
-        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
-        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
-        http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-3.2.xsd
-        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
-  ">
-  <context:annotation-config />
-  <context:component-scan base-package="com.gemstone.gemfire.rest.internal.web"/>
-  
-  <mvc:annotation-driven content-negotiation-manager="contentNegotiationManager">
-    <mvc:message-converters register-defaults="false">
-      <bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/>
-      <bean class="org.springframework.http.converter.ResourceHttpMessageConverter"/>
-      <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
-      <!-- bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" p:objectMapper-ref="objectMapper"/-->
-      <bean class="com.gemstone.gemfire.rest.internal.web.http.converter.CustomMappingJackson2HttpMessageConverter" p:objectMapper-ref="objectMapper"/>
-      <!--bean class="org.gopivotal.app.http.converter.json.JsonToPdxInstanceHttpMessageConverter"/-->
-      <!--bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"/-->
-      <!--bean class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter" p:marshaller-ref="jaxb2Marshaller" p:unmarshaller-ref="jaxb2Marshaller"/-->
-      <!--bean class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter" p:marshaller-ref="xstreamMarshaller" p:unmarshaller-ref="xstreamMarshaller"/-->
-      <!--bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"/-->
-    </mvc:message-converters>
-  </mvc:annotation-driven>
-
-  <mvc:default-servlet-handler/>
-
-  <bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"
-        p:favorPathExtension="true"
-        p:favorParameter="false"
-        p:ignoreAcceptHeader="false"
-        p:useJaf="false"
-        p:defaultContentType="application/json">
-    <property name="mediaTypes">
-      <value>
-        json=application/json
-      </value>
-    </property>
-  </bean>
-  
-  <!-- bean id="objectMapper" class="com.gemstone.gemfire.rest.internal.web.config.CustomObjectMapper" factory-method="newObjectMapper"></bean-->
-  <bean id="objectMapper" class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
-        p:failOnEmptyBeans="true"
-        p:indentOutput="true"
-        p:simpleDateFormat="MM/dd/yyyy"
-    >
-    <property name="featuresToEnable">
-      <array>
-        <util:constant static-field="com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_COMMENTS"/>
-        <util:constant static-field="com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_SINGLE_QUOTES"/>
-        <util:constant static-field="com.fasterxml.jackson.databind.DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT"/>
-      </array>
-    </property>
-    <property name="featuresToDisable">
-      <array>
-        <util:constant static-field="com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES"/>
-      </array>
-    </property>
-  </bean>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-web-api/src/main/webapp/WEB-INF/geode-servlet.xml
----------------------------------------------------------------------
diff --git a/geode-web-api/src/main/webapp/WEB-INF/geode-servlet.xml b/geode-web-api/src/main/webapp/WEB-INF/geode-servlet.xml
new file mode 100644
index 0000000..e96acb0
--- /dev/null
+++ b/geode-web-api/src/main/webapp/WEB-INF/geode-servlet.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:mvc="http://www.springframework.org/schema/mvc"
+       xmlns:oxm="http://www.springframework.org/schema/oxm"
+       xmlns:p="http://www.springframework.org/schema/p"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
+        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
+        http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-3.2.xsd
+        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
+  ">
+  <context:annotation-config />
+  <context:component-scan base-package="com.gemstone.gemfire.rest.internal.web"/>
+  
+  <mvc:annotation-driven content-negotiation-manager="contentNegotiationManager">
+    <mvc:message-converters register-defaults="false">
+      <bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/>
+      <bean class="org.springframework.http.converter.ResourceHttpMessageConverter"/>
+      <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
+      <!-- bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" p:objectMapper-ref="objectMapper"/-->
+      <bean class="com.gemstone.gemfire.rest.internal.web.http.converter.CustomMappingJackson2HttpMessageConverter" p:objectMapper-ref="objectMapper"/>
+      <!--bean class="org.gopivotal.app.http.converter.json.JsonToPdxInstanceHttpMessageConverter"/-->
+      <!--bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"/-->
+      <!--bean class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter" p:marshaller-ref="jaxb2Marshaller" p:unmarshaller-ref="jaxb2Marshaller"/-->
+      <!--bean class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter" p:marshaller-ref="xstreamMarshaller" p:unmarshaller-ref="xstreamMarshaller"/-->
+      <!--bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"/-->
+    </mvc:message-converters>
+  </mvc:annotation-driven>
+
+  <mvc:default-servlet-handler/>
+
+  <bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"
+        p:favorPathExtension="true"
+        p:favorParameter="false"
+        p:ignoreAcceptHeader="false"
+        p:useJaf="false"
+        p:defaultContentType="application/json">
+    <property name="mediaTypes">
+      <value>
+        json=application/json
+      </value>
+    </property>
+  </bean>
+  
+  <!-- bean id="objectMapper" class="com.gemstone.gemfire.rest.internal.web.config.CustomObjectMapper" factory-method="newObjectMapper"></bean-->
+  <bean id="objectMapper" class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
+        p:failOnEmptyBeans="true"
+        p:indentOutput="true"
+        p:simpleDateFormat="MM/dd/yyyy"
+    >
+    <property name="featuresToEnable">
+      <array>
+        <util:constant static-field="com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_COMMENTS"/>
+        <util:constant static-field="com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_SINGLE_QUOTES"/>
+        <util:constant static-field="com.fasterxml.jackson.databind.DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT"/>
+      </array>
+    </property>
+    <property name="featuresToDisable">
+      <array>
+        <util:constant static-field="com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES"/>
+      </array>
+    </property>
+  </bean>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-web-api/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/geode-web-api/src/main/webapp/WEB-INF/web.xml b/geode-web-api/src/main/webapp/WEB-INF/web.xml
index ad354f1..956294a 100644
--- a/geode-web-api/src/main/webapp/WEB-INF/web.xml
+++ b/geode-web-api/src/main/webapp/WEB-INF/web.xml
@@ -51,14 +51,14 @@ limitations under the License.
       The Spring DispatcherServlet (FrontController) handling all HTTP requests to the Developer REST API
       GemFire Web Application.
     </description>
-    <servlet-name>gemfire-api</servlet-name>
+    <servlet-name>geode</servlet-name>
     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
     <async-supported>true</async-supported>
   </servlet>
    
   <servlet-mapping>
-    <servlet-name>gemfire-api</servlet-name>
+    <servlet-name>geode</servlet-name>
     <url-pattern>/*</url-pattern>
   </servlet-mapping>
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-web/src/main/webapp/WEB-INF/gemfire-servlet.xml
----------------------------------------------------------------------
diff --git a/geode-web/src/main/webapp/WEB-INF/gemfire-servlet.xml b/geode-web/src/main/webapp/WEB-INF/gemfire-servlet.xml
deleted file mode 100644
index ce65933..0000000
--- a/geode-web/src/main/webapp/WEB-INF/gemfire-servlet.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:context="http://www.springframework.org/schema/context"
-       xmlns:mvc="http://www.springframework.org/schema/mvc"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-        http://www.springframework.org/schema/beans
-        http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
-        http://www.springframework.org/schema/context
-        http://www.springframework.org/schema/context/spring-context-3.2.xsd
-        http://www.springframework.org/schema/mvc
-        http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
-
-  <context:component-scan base-package="com.gemstone.gemfire.management.internal.web"/>
-
-  <bean id="asyncTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
-    <property name="corePoolSize" value="5"/>
-    <property name="maxPoolSize" value="25"/>
-    <property name="queueCapacity" value="25"/>
-  </bean>
-
-  <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>
-
-  <mvc:annotation-driven>
-    <!-- default timeout set to 2 hours; used for Gfsh commands such as 'rebalance' -->
-    <mvc:async-support default-timeout="7200000" task-executor="asyncTaskExecutor"/>
-    <mvc:message-converters>
-      <bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/>
-      <bean class="org.springframework.http.converter.ResourceHttpMessageConverter"/>
-      <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
-      <!--bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/-->
-      <bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"/>
-      <bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"/>
-      <bean class="org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter"/>
-      <bean class="com.gemstone.gemfire.management.internal.web.http.converter.SerializableObjectHttpMessageConverter"/>
-    </mvc:message-converters>
-  </mvc:annotation-driven>
-
-  <mvc:interceptors>
-    <bean class="com.gemstone.gemfire.management.internal.web.controllers.support.LoginHandlerInterceptor"/>
-  </mvc:interceptors>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-web/src/main/webapp/WEB-INF/geode-mgmt-servlet.xml
----------------------------------------------------------------------
diff --git a/geode-web/src/main/webapp/WEB-INF/geode-mgmt-servlet.xml b/geode-web/src/main/webapp/WEB-INF/geode-mgmt-servlet.xml
new file mode 100644
index 0000000..ce65933
--- /dev/null
+++ b/geode-web/src/main/webapp/WEB-INF/geode-mgmt-servlet.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:mvc="http://www.springframework.org/schema/mvc"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+        http://www.springframework.org/schema/context
+        http://www.springframework.org/schema/context/spring-context-3.2.xsd
+        http://www.springframework.org/schema/mvc
+        http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
+
+  <context:component-scan base-package="com.gemstone.gemfire.management.internal.web"/>
+
+  <bean id="asyncTaskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
+    <property name="corePoolSize" value="5"/>
+    <property name="maxPoolSize" value="25"/>
+    <property name="queueCapacity" value="25"/>
+  </bean>
+
+  <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>
+
+  <mvc:annotation-driven>
+    <!-- default timeout set to 2 hours; used for Gfsh commands such as 'rebalance' -->
+    <mvc:async-support default-timeout="7200000" task-executor="asyncTaskExecutor"/>
+    <mvc:message-converters>
+      <bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter"/>
+      <bean class="org.springframework.http.converter.ResourceHttpMessageConverter"/>
+      <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
+      <!--bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/-->
+      <bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"/>
+      <bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"/>
+      <bean class="org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter"/>
+      <bean class="com.gemstone.gemfire.management.internal.web.http.converter.SerializableObjectHttpMessageConverter"/>
+    </mvc:message-converters>
+  </mvc:annotation-driven>
+
+  <mvc:interceptors>
+    <bean class="com.gemstone.gemfire.management.internal.web.controllers.support.LoginHandlerInterceptor"/>
+  </mvc:interceptors>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-web/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/geode-web/src/main/webapp/WEB-INF/web.xml b/geode-web/src/main/webapp/WEB-INF/web.xml
index 24180b9..d6c591f 100644
--- a/geode-web/src/main/webapp/WEB-INF/web.xml
+++ b/geode-web/src/main/webapp/WEB-INF/web.xml
@@ -42,14 +42,14 @@ limitations under the License.
       The Spring DispatcherServlet (FrontController) handling all HTTP requests to the Management and Monitoring
       REST API GemFire Web Application.
     </description>
-    <servlet-name>gemfire</servlet-name>
+    <servlet-name>geode-mgmt</servlet-name>
     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
     <async-supported>true</async-supported>
     <load-on-startup>1</load-on-startup>
   </servlet>
 
   <servlet-mapping>
-    <servlet-name>gemfire</servlet-name>
+    <servlet-name>geode-mgmt</servlet-name>
     <url-pattern>/*</url-pattern>
   </servlet-mapping>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd4df9aa/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConnectCommandWithHttpAndSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConnectCommandWithHttpAndSSLDUnitTest.java b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConnectCommandWithHttpAndSSLDUnitTest.java
index 27c948b..dab762b 100644
--- a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConnectCommandWithHttpAndSSLDUnitTest.java
+++ b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConnectCommandWithHttpAndSSLDUnitTest.java
@@ -16,13 +16,16 @@
  */
 package com.gemstone.gemfire.management.internal.cli.commands;
 
+import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
 import static com.gemstone.gemfire.management.internal.cli.i18n.CliStrings.*;
 import static com.gemstone.gemfire.util.test.TestUtil.*;
 import static org.junit.Assert.*;
-import static com.gemstone.gemfire.distributed.ConfigurationProperties.*;
 
 import java.io.File;
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.Properties;
+
 import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.HttpsURLConnection;
 import javax.net.ssl.SSLSession;
@@ -30,24 +33,35 @@ import javax.net.ssl.SSLSession;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
 
 import com.gemstone.gemfire.management.internal.cli.HeadlessGfsh;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
 import com.gemstone.gemfire.test.junit.categories.SecurityTest;
+import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
 
 /**
  * @since GemFire  8.1
  */
 @Category({ DistributedTest.class, SecurityTest.class })
+@RunWith(Parameterized.class)
+@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
 public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
 
   private static final ThreadLocal<Properties> sslInfoHolder = new ThreadLocal<>();
 
   private File jks;
 
-  // TODO: should this test use @RunWith(Parameterized.class)?
+  @Parameterized.Parameter
+  public String urlContext;
+
+  @Parameterized.Parameters
+  public static Collection<String> data() {
+    return Arrays.asList("/geode-mgmt", "/gemfire");
+  }
 
   @Override
   public final void postSetUpCliCommandTestBase() throws Exception {
@@ -267,7 +281,7 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
       }
     });
     
-    endpoint = "https://" + host + ":" + httpPort + "/gemfire/v1";
+    endpoint = "https://" + host + ":" + httpPort + urlContext + "/v1";
     
     command.addOption(CONNECT__USE_HTTP, Boolean.TRUE.toString());
     command.addOption(CONNECT__URL, endpoint);


Mime
View raw message