brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-83) HTTP tests under NetBeans fail -- too much unwrapping
Date Wed, 12 Nov 2014 10:50:33 GMT

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

Aled Sage commented on BROOKLYN-83:
-----------------------------------

I don't think this is just NetBeans. The test `SensorResourceIntegrationTest.testSensorBytes()`
was failing in jenkins (i.e. CLI, running on Ubuntu) with a very similar error.

See the fix in https://github.com/apache/incubator-brooklyn/commit/50cfb17d22448e4699763b2684dbe8158ecb2392.
For some reason it was defaulting to the `text/plain` version instead of `application/json`,
hence the string not being quoted (i.e. not being returned in json).

I don't know whether it the client was sending `text/plain` (even though we hadn't told it
to), or if the server-side was defaulting to `SensorApi.getPlain()` rather than `get()` when
there was no `Accepts` defined.

I'll rename the issue again, as it is not caused by too much unwrapping.

> HTTP tests under NetBeans fail -- too much unwrapping
> -----------------------------------------------------
>
>                 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)

Mime
View raw message