brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] incubator-brooklyn pull request: Fix various tests
Date Thu, 13 Nov 2014 22:29:07 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: usage/rest-server/src/test/java/brooklyn/rest/resources/
    @@ -101,16 +101,19 @@ public boolean apply(SensorSummary sensorSummary) {
         @Test(groups="Integration", dependsOnMethods = { "testListSensorsRedis", "testListEntities"
    -    public void testTriggerRedisStopEffector() throws InterruptedException {
    +    public void testTriggerRedisStopEffector() throws Exception {
             ClientResponse response = client().resource("/v1/applications/redis-app/entities/redis-ent/effectors/stop")
                     .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());
    +        final String expectedStatus = Lifecycle.STOPPED.toString();
             Asserts.succeedsEventually(MutableMap.of("timeout", 60 * 1000), new Runnable()
                 public void run() {
    +                // Accept with and without quotes; if don't specify "Accepts" header,
    +                // might get back json or plain text (depending on compiler / java runtime

    +                // used for SensorApi!)
    --- End diff --
    See for more discussion.
    I'm not sure how we bend resteasy to our will for that, especially given
saying that it is the first method.
    If there is no "Accepts" passed in, then how would we ensure that only one of the methods
    Anyway, not addressing in this PR.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message