Github user alasdairhodge commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/326#discussion_r20293349
  
    --- Diff: 
usage/rest-server/src/test/java/brooklyn/rest/resources/ApplicationResourceIntegrationTest.java
 ---
    @@ -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")
                     .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());
    +        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, then
    +                // might get back json or plain text (depending on 
compiler / java runtime 
    +                // used for SensorApi!)
    --- End diff --
    
    I've seen the discussion about this; it's horrible. Surely we should be 
able to guarantee deterministic behaviour?!


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to