Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5900917B76 for ; Wed, 12 Nov 2014 11:03:55 +0000 (UTC) Received: (qmail 69796 invoked by uid 500); 12 Nov 2014 11:03:55 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 69756 invoked by uid 500); 12 Nov 2014 11:03:55 -0000 Mailing-List: contact dev-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list dev@brooklyn.incubator.apache.org Received: (qmail 69745 invoked by uid 99); 12 Nov 2014 11:03:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Nov 2014 11:03:55 +0000 X-ASF-Spam-Status: No, hits=-2000.6 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 12 Nov 2014 11:03:54 +0000 Received: (qmail 69626 invoked by uid 99); 12 Nov 2014 11:03:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Nov 2014 11:03:33 +0000 Date: Wed, 12 Nov 2014 11:03:33 +0000 (UTC) From: "Aled Sage (JIRA)" To: dev@brooklyn.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BROOKLYN-83) HTTP tests under NetBeans fail -- defaulting to Accepts text/plain? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/BROOKLYN-83?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14207932#comment-14207932 ] Aled Sage commented on BROOKLYN-83: ----------------------------------- According to https://docs.oracle.com/cd/E19776-01/820-4867/ghrpv/, 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 order. 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: 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)