[ 
https://issues.apache.org/jira/browse/BROOKLYN-83?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14211387#comment-14211387
 ] 

ASF GitHub Bot commented on BROOKLYN-83:
----------------------------------------

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

    https://github.com/apache/incubator-brooklyn/pull/326#discussion_r20328811
  
    --- 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 --
    
    See https://issues.apache.org/jira/browse/BROOKLYN-83 for more discussion.
    I'm not sure how we bend resteasy to our will for that, especially given 
https://docs.oracle.com/cd/E19776-01/820-4867/ghrpv/ 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 matches?
    
    Anyway, not addressing in this PR.


> HTTP tests under NetBeans fail -- defaulting to Accepts text/plain?
> -------------------------------------------------------------------
>
>                 Key: BROOKLYN-83
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-83
>             Project: Brooklyn
>          Issue Type: Bug
>         Environment: netbeans
>            Reporter: David Medinets
>            Priority: Minor
>
> I cloned the github repository this evening. Then ran a build using NetBeans. 
> I ran into the following test failure:
> testGet(brooklyn.rest.resources.SensorResourceTest)  Time elapsed: 0.004 sec  
> <<< FAILURE!
> java.lang.AssertionError: expected ["12345 frogs"] but found [12345 frogs]
>       at org.testng.Assert.fail(Assert.java:94)
>       at org.testng.Assert.failNotEquals(Assert.java:494)
>       at org.testng.Assert.assertEquals(Assert.java:123)
>       at org.testng.Assert.assertEquals(Assert.java:165)
>       at 
> brooklyn.rest.resources.SensorResourceTest.doSensorTestUntyped(SensorResourceTest.java:161)
>       at 
> brooklyn.rest.resources.SensorResourceTest.doSensorTest(SensorResourceTest.java:143)
>       at 
> brooklyn.rest.resources.SensorResourceTest.testGet(SensorResourceTest.java:170)
> I marked this critical because the build failed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to