geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kdul...@apache.org
Subject [12/13] geode git commit: GEODE-2539: Upgrading Jetty causes RestSecurityItegrationTest to fail
Date Wed, 08 Mar 2017 18:44:32 GMT
GEODE-2539: Upgrading Jetty causes RestSecurityItegrationTest to fail


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

Branch: refs/heads/develop
Commit: 3bde1a748c4e1dbb4580032e8144cd6fa697d85d
Parents: 168f4ce
Author: Kevin J. Duling <kduling@pivotal.io>
Authored: Mon Mar 6 12:08:28 2017 -0800
Committer: Kevin J. Duling <kduling@pivotal.io>
Committed: Wed Mar 8 10:43:30 2017 -0800

----------------------------------------------------------------------
 .../web/RestSecurityIntegrationTest.java        | 144 ++++++++++---------
 .../web/RestSecurityPostProcessorTest.java      |  20 ++-
 gradle/dependency-versions.properties           |   2 +-
 3 files changed, 90 insertions(+), 76 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/3bde1a74/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java
b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java
index 85fc5be..dee004f 100644
--- a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityIntegrationTest.java
@@ -18,6 +18,7 @@ import static org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_
 import static org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT;
 import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANAGER;
 import static org.apache.geode.distributed.ConfigurationProperties.START_DEV_REST_API;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -71,104 +72,107 @@ public class RestSecurityIntegrationTest {
     String json = "{\"@type\":\"double\",\"@value\":210}";
 
     HttpResponse response = restClient.doGet("/functions", "unknown-user", "1234567");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
     response = restClient.doGet("/functions", "stranger", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
     response = restClient.doGet("/functions", "dataReader", "1234567");
-    assertEquals(200, restClient.getCode(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
     response.getEntity();
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, restClient.getContentType(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
 
     response = restClient.doPost("/functions/AddFreeItemsToOrder", "unknown-user", "1234567",
json);
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
     response = restClient.doPost("/functions/AddFreeItemsToOrder", "dataReader", "1234567",
json);
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
     response = restClient.doPost("/functions/AddFreeItemsToOrder?onRegion=" + REGION_NAME,
         "dataWriter", "1234567", json);
     // because we're only testing the security of the endpoint, not the endpoint functionality,
a
     // 500 is acceptable
-    assertEquals(500, restClient.getCode(response));
+    assertEquals(500, GeodeRestClient.getCode(response));
   }
 
   @Test
   public void testQueries() throws Exception {
     HttpResponse response = restClient.doGet("/queries", "unknown-user", "1234567");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
     response = restClient.doGet("/queries", "stranger", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
     response = restClient.doGet("/queries", "dataReader", "1234567");
-    assertEquals(200, restClient.getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, restClient.getContentType(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
   }
 
   @Test
   public void testAdhocQuery() throws Exception {
     HttpResponse response = restClient.doGet("/queries/adhoc?q=", "unknown-user", "1234567");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
     response = restClient.doGet("/queries/adhoc?q=", "stranger", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
     response = restClient.doGet("/queries/adhoc?q=", "dataReader", "1234567");
     // because we're only testing the security of the endpoint, not the endpoint functionality,
a
     // 500 is acceptable
-    assertEquals(500, restClient.getCode(response));
+    assertEquals(500, GeodeRestClient.getCode(response));
   }
 
   @Test
   public void testPostQuery() throws Exception {
     HttpResponse response = restClient.doPost("/queries?id=0&q=", "unknown-user", "1234567",
"");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
     response = restClient.doPost("/queries?id=0&q=", "stranger", "1234567", "");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
     response = restClient.doPost("/queries?id=0&q=", "dataReader", "1234567", "");
     // because we're only testing the security of the endpoint, not the endpoint functionality,
a
     // 500 is acceptable
-    assertEquals(500, restClient.getCode(response));
+    assertEquals(500, GeodeRestClient.getCode(response));
   }
 
   @Test
   public void testPostQuery2() throws Exception {
     HttpResponse response =
         restClient.doPost("/queries/id", "unknown-user", "1234567", "{\"id\" : \"foo\"}");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
     response = restClient.doPost("/queries/id", "stranger", "1234567", "{\"id\" : \"foo\"}");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
     response = restClient.doPost("/queries/id", "dataReader", "1234567", "{\"id\" : \"foo\"}");
     // We should get a 404 because we're trying to update a query that doesn't exist
-    assertEquals(404, restClient.getCode(response));
+    assertEquals(404, GeodeRestClient.getCode(response));
   }
 
   @Test
   public void testPutQuery() throws Exception {
     HttpResponse response =
         restClient.doPut("/queries/id", "unknown-user", "1234567", "{\"id\" : \"foo\"}");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
     response = restClient.doPut("/queries/id", "stranger", "1234567", "{\"id\" : \"foo\"}");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
     response = restClient.doPut("/queries/id", "dataReader", "1234567", "{\"id\" : \"foo\"}");
     // We should get a 404 because we're trying to update a query that doesn't exist
-    assertEquals(404, restClient.getCode(response));
+    assertEquals(404, GeodeRestClient.getCode(response));
   }
 
   @Test
   public void testDeleteQuery() throws Exception {
     HttpResponse response = restClient.doDelete("/queries/id", "unknown-user", "1234567");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
     response = restClient.doDelete("/queries/id", "stranger", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
     response = restClient.doDelete("/queries/id", "dataWriter", "1234567");
     // We should get a 404 because we're trying to delete a query that doesn't exist
-    assertEquals(404, restClient.getCode(response));
+    assertEquals(404, GeodeRestClient.getCode(response));
   }
 
   @Test
   public void testServers() throws Exception {
     HttpResponse response = restClient.doGet("/servers", "unknown-user", "1234567");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
     response = restClient.doGet("/servers", "stranger", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
     response = restClient.doGet("/servers", "super-user", "1234567");
-    assertEquals(200, restClient.getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, restClient.getContentType(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
   }
 
   /**
@@ -178,14 +182,14 @@ public class RestSecurityIntegrationTest {
   @Test
   public void testPing() throws Exception {
     HttpResponse response = restClient.doHEAD("/ping", "stranger", "1234567");
-    assertEquals(200, restClient.getCode(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
     response = restClient.doGet("/ping", "stranger", "1234567");
-    assertEquals(200, restClient.getCode(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
 
     response = restClient.doHEAD("/ping", "super-user", "1234567");
-    assertEquals(200, restClient.getCode(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
     response = restClient.doGet("/ping", "super-user", "1234567");
-    assertEquals(200, restClient.getCode(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
   }
 
   /**
@@ -194,10 +198,11 @@ public class RestSecurityIntegrationTest {
   @Test
   public void getRegions() throws Exception {
     HttpResponse response = restClient.doGet("", "dataReader", "1234567");
-    assertEquals("A '200 - OK' was expected", 200, restClient.getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, restClient.getContentType(response));
+    assertEquals("A '200 - OK' was expected", 200, GeodeRestClient.getCode(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
 
-    JSONObject jsonObject = restClient.getJsonObject(response);
+    JSONObject jsonObject = GeodeRestClient.getJsonObject(response);
     JSONArray regions = jsonObject.getJSONArray("regions");
     assertNotNull(regions);
     assertTrue(regions.length() > 0);
@@ -207,11 +212,11 @@ public class RestSecurityIntegrationTest {
 
     // List regions with an unknown user - 401
     response = restClient.doGet("", "unknown-user", "badpassword");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
 
     // list regions with insufficent rights - 403
     response = restClient.doGet("", "authRegionReader", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
   }
 
   /**
@@ -221,16 +226,17 @@ public class RestSecurityIntegrationTest {
   public void getRegion() throws Exception {
     // Test an unknown user - 401 error
     HttpResponse response = restClient.doGet("/" + REGION_NAME, "unknown-user", "1234567");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
 
     // Test a user with insufficient rights - 403
     response = restClient.doGet("/" + REGION_NAME, "stranger", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
 
     // Test an authorized user - 200
     response = restClient.doGet("/" + REGION_NAME, "super-user", "1234567");
-    assertEquals(200, restClient.getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, restClient.getContentType(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
   }
 
   /**
@@ -240,15 +246,15 @@ public class RestSecurityIntegrationTest {
   public void headRegion() throws Exception {
     // Test an unknown user - 401 error
     HttpResponse response = restClient.doHEAD("/" + REGION_NAME, "unknown-user", "1234567");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
 
     // Test a user with insufficient rights - 403
     response = restClient.doHEAD("/" + REGION_NAME, "stranger", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
 
     // Test an authorized user - 200
     response = restClient.doHEAD("/" + REGION_NAME, "super-user", "1234567");
-    assertEquals(200, restClient.getCode(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
   }
 
   /**
@@ -258,11 +264,11 @@ public class RestSecurityIntegrationTest {
   public void deleteRegion() throws Exception {
     // Test an unknown user - 401 error
     HttpResponse response = restClient.doDelete("/" + REGION_NAME, "unknown-user", "1234567");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
 
     // Test a user with insufficient rights - 403
     response = restClient.doDelete("/" + REGION_NAME, "dataReader", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
   }
 
   /**
@@ -272,11 +278,12 @@ public class RestSecurityIntegrationTest {
   public void getRegionKeys() throws Exception {
     // Test an authorized user
     HttpResponse response = restClient.doGet("/" + REGION_NAME + "/keys", "super-user", "1234567");
-    assertEquals(200, restClient.getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, restClient.getContentType(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
     // Test an unauthorized user
     response = restClient.doGet("/" + REGION_NAME + "/keys", "dataWriter", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
   }
 
   /**
@@ -286,12 +293,13 @@ public class RestSecurityIntegrationTest {
   public void getRegionKey() throws Exception {
     // Test an authorized user
     HttpResponse response = restClient.doGet("/" + REGION_NAME + "/key1", "key1User", "1234567");
-    assertEquals(200, restClient.getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, restClient.getContentType(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
 
     // Test an unauthorized user
     response = restClient.doGet("/" + REGION_NAME + "/key1", "dataWriter", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
   }
 
   /**
@@ -302,15 +310,15 @@ public class RestSecurityIntegrationTest {
     // Test an unknown user - 401 error
     HttpResponse response =
         restClient.doDelete("/" + REGION_NAME + "/key1", "unknown-user", "1234567");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
 
     // Test a user with insufficient rights - 403
     response = restClient.doDelete("/" + REGION_NAME + "/key1", "dataReader", "1234567");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
 
     // Test an authorized user - 200
     response = restClient.doDelete("/" + REGION_NAME + "/key1", "key1User", "1234567");
-    assertEquals(200, restClient.getCode(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
   }
 
   /**
@@ -321,17 +329,17 @@ public class RestSecurityIntegrationTest {
     // Test an unknown user - 401 error
     HttpResponse response = restClient.doPost("/" + REGION_NAME + "?key9", "unknown", "1234567",
         "{ \"key9\" : \"foo\" }");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
 
     // Test a user with insufficient rights - 403
     response = restClient.doPost("/" + REGION_NAME + "?key9", "dataReader", "1234567",
         "{ \"key9\" : \"foo\" }");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
 
     // Test an authorized user - 200
     response = restClient.doPost("/" + REGION_NAME + "?key9", "dataWriter", "1234567",
         "{ \"key9\" : \"foo\" }");
-    assertEquals(201, restClient.getCode(response));
+    assertEquals(201, GeodeRestClient.getCode(response));
   }
 
   /**
@@ -347,33 +355,33 @@ public class RestSecurityIntegrationTest {
     // Test an unknown user - 401 error
     HttpResponse response = restClient.doPut("/" + REGION_NAME + "/key1?op=PUT", "unknown-user",
         "1234567", "{ \"key9\" : \"foo\" }");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
 
     response = restClient.doPut("/" + REGION_NAME + "/key1?op=CAS", "unknown-user", "1234567",
         "{ \"key9\" : \"foo\" }");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
     response = restClient.doPut("/" + REGION_NAME + "/key1?op=REPLACE", "unknown-user", "1234567",
         "{ \"@old\" : \"value1\", \"@new\" : \"CASvalue\" }");
-    assertEquals(401, restClient.getCode(response));
+    assertEquals(401, GeodeRestClient.getCode(response));
 
     response = restClient.doPut("/" + REGION_NAME + "/key1?op=PUT", "dataReader", "1234567",
         "{ \"key1\" : \"foo\" }");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
 
     response = restClient.doPut("/" + REGION_NAME + "/key1?op=REPLACE", "dataReader", "1234567",
         "{ \"key1\" : \"foo\" }");
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
 
     response =
         restClient.doPut("/" + REGION_NAME + "/key1?op=CAS", "dataReader", "1234567", casJSON);
-    assertEquals(403, restClient.getCode(response));
+    assertEquals(403, GeodeRestClient.getCode(response));
 
     response = restClient.doPut("/" + REGION_NAME + "/key1?op=PUT", "key1User", "1234567",
         "{ \"key1\" : \"foo\" }");
-    assertEquals(200, restClient.getCode(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
 
     response =
         restClient.doPut("/" + REGION_NAME + "/key1?op=REPLACE", "key1User", "1234567", json);
-    assertEquals(200, restClient.getCode(response));
+    assertEquals(200, GeodeRestClient.getCode(response));
   }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/3bde1a74/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityPostProcessorTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityPostProcessorTest.java
b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityPostProcessorTest.java
index 82e9b7f..ab21094 100644
--- a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityPostProcessorTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/RestSecurityPostProcessorTest.java
@@ -20,9 +20,9 @@ import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANA
 import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_POST_PROCESSOR;
 import static org.apache.geode.distributed.ConfigurationProperties.START_DEV_REST_API;
 import static org.apache.geode.rest.internal.web.GeodeRestClient.getCode;
-import static org.apache.geode.rest.internal.web.GeodeRestClient.getContentType;
 import static org.apache.geode.rest.internal.web.GeodeRestClient.getJsonArray;
 import static org.apache.geode.rest.internal.web.GeodeRestClient.getJsonObject;
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -86,7 +86,8 @@ public class RestSecurityPostProcessorTest {
     // Test a single key
     HttpResponse response = restClient.doGet("/customers/1", "dataReader", "1234567");
     assertEquals(200, getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, getContentType(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
 
     // Ensure SSN is hidden
     JSONObject jsonObject = getJsonObject(response);
@@ -96,7 +97,8 @@ public class RestSecurityPostProcessorTest {
     // Try with super-user
     response = restClient.doGet("/customers/1", "super-user", "1234567");
     assertEquals(200, getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, getContentType(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
 
     // ensure SSN is readable
     jsonObject = getJsonObject(response);
@@ -109,7 +111,8 @@ public class RestSecurityPostProcessorTest {
   public void getMultipleRegionKeys() throws Exception {
     HttpResponse response = restClient.doGet("/customers/1,3", "dataReader", "1234567");
     assertEquals(200, getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, getContentType(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
 
     JSONObject jsonObject = getJsonObject(response);
     JSONArray jsonArray = jsonObject.getJSONArray("customers");
@@ -127,7 +130,8 @@ public class RestSecurityPostProcessorTest {
   public void getRegion() throws Exception {
     HttpResponse response = restClient.doGet("/customers", "dataReader", "1234567");
     assertEquals(200, getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, getContentType(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
 
     JSONObject jsonObject = getJsonObject(response);
     JSONArray jsonArray = jsonObject.getJSONArray("customers");
@@ -145,7 +149,8 @@ public class RestSecurityPostProcessorTest {
         + URLEncoder.encode("SELECT * FROM /customers order by customerId", "UTF-8");
     HttpResponse response = restClient.doGet(query, "dataReader", "1234567");
     assertEquals(200, getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, getContentType(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
 
     JSONArray jsonArray = getJsonArray(response);
     final int length = jsonArray.length();
@@ -171,7 +176,8 @@ public class RestSecurityPostProcessorTest {
     String query = "/queries";
     response = restClient.doGet(query, "dataReader", "1234567");
     assertEquals(200, getCode(response));
-    assertEquals(MediaType.APPLICATION_JSON_UTF8_VALUE, getContentType(response));
+    assertThat(GeodeRestClient.getContentType(response))
+        .containsIgnoringCase(MediaType.APPLICATION_JSON_UTF8_VALUE);
 
     // Execute the query
     response = restClient.doPost("/queries/selectCustomer", "dataReader", "1234567",

http://git-wip-us.apache.org/repos/asf/geode/blob/3bde1a74/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index 34e5d67..90601ac 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -52,7 +52,7 @@ javax.resource-api.version = 1.7
 javax.servlet-api.version = 3.1.0
 javax.transaction-api.version = 1.2
 jedis.version = 2.9.0
-jetty.version = 9.3.6.v20151106
+jetty.version = 9.4.2.v20170220
 jgroups.version = 3.6.10.Final
 jmock.version = 2.8.2
 jna.version = 4.0.0


Mime
View raw message