brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbouron <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #414: Improvement of TestHttpCall entity
Date Tue, 08 Nov 2016 12:10:08 GMT
Github user tbouron commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/414#discussion_r86976014
  
    --- Diff: test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
---
    @@ -94,7 +110,12 @@ public String get() {
                         @Override
                         public Integer get() {
                             try {
    -                            return HttpTool.getHttpStatusCode(url);
    +                            final Maybe<HttpResponse> response = HttpTool.execAndConsume(HttpTool.httpClientBuilder().build(),
createHttpMethod(method, url, headers, body)).getResponse();
    +                            if (response.isPresentAndNonNull()) {
    +                                return response.get().getStatusLine().getStatusCode();
    +                            } else {
    +                                throw new Exception("HTTP call did not return any reponse");
    --- End diff --
    
    Addressed


---
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.
---

Mime
View raw message