You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by "Alex Heneveld (JIRA)" <ji...@apache.org> on 2014/11/12 10:16:33 UTC

[jira] [Commented] (BROOKLYN-83) SensorResourceTest.testGet: expected ["12345 frogs"] but found [12345 frogs]

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

Alex Heneveld commented on BROOKLYN-83:
---------------------------------------

David, do the tests work for you from command-line maven?

I suspect this may be a NetBeans issue.  The error here, combined with the error at BROOKLYN-84, suggests in both cases the test running in NetBeans is unwrapping the result -- converting JSON string to java string here, and converting raw string containing an int to a java int in 84.  But our test is requesting the raw result data (ie the json or raw string), and so it fails.

David if you can shed any light on the NetBeans configuration or any tweaks to the test to make them portable that would be very helpful.

If you just need a build of course, you should be able to use the CLI to build or run with -DskipTests .

Changing the issue summary to reflect this and marking 84 as duplicate BTW.

> SensorResourceTest.testGet: expected ["12345 frogs"] but found [12345 frogs]
> ----------------------------------------------------------------------------
>
>                 Key: BROOKLYN-83
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-83
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: David Medinets
>            Priority: Critical
>
> 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)