brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [1/9] git commit: Fix ApplicationResourceIntegrationTest.testTriggerRedisStopEffector
Date Mon, 03 Nov 2014 14:24:53 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master aa20ae71b -> 1f73dcf10


Fix ApplicationResourceIntegrationTest.testTriggerRedisStopEffector

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

Branch: refs/heads/master
Commit: 91ca4d2d566702c0f0761485389a39002578ce91
Parents: e830251
Author: Aled Sage <aled.sage@gmail.com>
Authored: Mon Nov 3 10:55:11 2014 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Mon Nov 3 10:55:11 2014 +0000

----------------------------------------------------------------------
 .../rest/resources/ApplicationResourceIntegrationTest.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/91ca4d2d/usage/rest-server/src/test/java/brooklyn/rest/resources/ApplicationResourceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/usage/rest-server/src/test/java/brooklyn/rest/resources/ApplicationResourceIntegrationTest.java
b/usage/rest-server/src/test/java/brooklyn/rest/resources/ApplicationResourceIntegrationTest.java
index 7cf761f..d8074b3 100644
--- a/usage/rest-server/src/test/java/brooklyn/rest/resources/ApplicationResourceIntegrationTest.java
+++ b/usage/rest-server/src/test/java/brooklyn/rest/resources/ApplicationResourceIntegrationTest.java
@@ -25,6 +25,7 @@ import java.net.URI;
 import java.util.Set;
 import java.util.concurrent.TimeoutException;
 
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
 import org.slf4j.Logger;
@@ -102,15 +103,16 @@ public class ApplicationResourceIntegrationTest extends BrooklynRestResourceTest
     @Test(groups="Integration", dependsOnMethods = { "testListSensorsRedis", "testListEntities"
})
     public void testTriggerRedisStopEffector() throws InterruptedException {
         ClientResponse response = client().resource("/v1/applications/redis-app/entities/redis-ent/effectors/stop")
+                .type(MediaType.APPLICATION_JSON_TYPE)
                 .post(ClientResponse.class, ImmutableMap.of());
-
         assertEquals(response.getStatus(), Response.Status.ACCEPTED.getStatusCode());
 
         final URI stateSensor = URI.create("/v1/applications/redis-app/entities/redis-ent/sensors/service.state");
         final String expectedStatus = String.format("\"%s\"", Lifecycle.STOPPED.toString());
         Asserts.succeedsEventually(MutableMap.of("timeout", 60 * 1000), new Runnable() {
             public void run() {
-                assertEquals(client().resource(stateSensor).get(String.class), expectedStatus);
+                String val = client().resource(stateSensor).get(String.class);
+                assertTrue(expectedStatus.equalsIgnoreCase(val));
             }
         });
     }


Mime
View raw message