Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 07382200BBD for ; Tue, 8 Nov 2016 22:45:53 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 05B43160B0A; Tue, 8 Nov 2016 21:45:53 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7577F160AD0 for ; Tue, 8 Nov 2016 22:45:52 +0100 (CET) Received: (qmail 95923 invoked by uid 500); 8 Nov 2016 21:45:51 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 95912 invoked by uid 99); 8 Nov 2016 21:45:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2016 21:45:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 55F09E01F4; Tue, 8 Nov 2016 21:45:51 +0000 (UTC) From: aledsage To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-server pull request #414: Improvement of TestHttpCall entity Content-Type: text/plain Message-Id: <20161108214551.55F09E01F4@git1-us-west.apache.org> Date: Tue, 8 Nov 2016 21:45:51 +0000 (UTC) archived-at: Tue, 08 Nov 2016 21:45:53 -0000 Github user aledsage commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/414#discussion_r87090913 --- Diff: test-framework/src/test/java/org/apache/brooklyn/test/framework/TestHttpCallTest.java --- @@ -87,6 +96,11 @@ public void testHttpBodyAssertions() { .configure(TestHttpCall.TARGET_URL, server.getUrl() + "/body.json") .configure(TestHttpCall.TIMEOUT, new Duration(10L, TimeUnit.SECONDS)) .configure(TestSensor.ASSERTIONS, newAssertion("matches", ".*123.*"))); + app.createAndManageChild(EntitySpec.create(TestHttpCall.class) + .configure(TestHttpCall.TARGET_URL, server.getUrl() + "/foo/bar") + .configure(TestHttpCall.TARGET_METHOD, TestHttpCall.HttpMethod.POST) + .configure(TestHttpCall.TIMEOUT, new Duration(10L, TimeUnit.SECONDS)) --- End diff -- Personal preference: we should use `Asserts.DEFAULT_LONG_TIMEOUT` rather than our code being littered with arbitrary timeouts. In my opinion, the only time one should set different timeouts for something we expect to not timeout is if it's a performance test. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---