brooklyn-dev mailing list archives

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

    https://github.com/apache/brooklyn-server/pull/414#discussion_r86972775
  
    --- Diff: test-framework/src/main/java/org/apache/brooklyn/test/framework/TestHttpCallImpl.java
---
    @@ -109,6 +130,49 @@ public Integer get() {
             }
         }
     
    +    private HttpRequestBase createHttpMethod(HttpMethod method, String url, Map<String,
String> headers, String body) throws Exception {
    +        switch (method) {
    +            case GET:
    +                HttpTool.HttpGetBuilder httpGetBuilder = new HttpTool.HttpGetBuilder(new
URI(url));
    --- End diff --
    
    This is a code-smell that we need to do lots of identical code for each case, rather than
being able to use the `HttpTool` in a simpler way (e.g. passing in the method to a generic
request builder, perhaps).


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