brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <>
Subject [jira] [Commented] (BROOKLYN-83) HTTP tests under NetBeans fail -- defaulting to Accepts text/plain?
Date Wed, 12 Nov 2014 11:03:33 GMT


Aled Sage commented on BROOKLYN-83:

According to, the rules for which method
is the default (i.e. if no "Accepts" is supplied) is:
    ... If both are equally acceptable, then the former will be chosen because it occurs first.

If I rename the `SensorApi.get()` method to `SensorApi.getZ()` then the tests fail in the
same way as reported in this bug.

Depending how resteasy is determining the method order, this could be entirely random based
on the compiler used. For example, `class.getMethods()` gives no guarantee about the returned

I think we should delete the methods that are testing defaults, and just have the methods
that explicitly say whether they want plain or json back.

> HTTP tests under NetBeans fail -- defaulting to Accepts text/plain?
> -------------------------------------------------------------------
>                 Key: BROOKLYN-83
>                 URL:
>             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(  Time elapsed: 0.004 sec  <<<
> java.lang.AssertionError: expected ["12345 frogs"] but found [12345 frogs]
> 	at
> 	at org.testng.Assert.failNotEquals(
> 	at org.testng.Assert.assertEquals(
> 	at org.testng.Assert.assertEquals(
> 	at
> 	at
> 	at
> I marked this critical because the build failed.

This message was sent by Atlassian JIRA

View raw message