brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grkvlt <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Fix various integration tests
Date Fri, 31 Oct 2014 13:49:00 GMT
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/285#discussion_r19667150
  
    --- Diff: software/webapp/src/test/java/brooklyn/entity/dns/geoscaling/GeoscalingIntegrationTest.java
---
    @@ -190,10 +191,19 @@ public StubHostGeoLookup(String delegateImpl) throws Exception {
     
             @Override
             public HostGeoInfo getHostGeoInfo(InetAddress address) throws Exception {
    -            if (HOMELESS_IP.equals(address.getHostAddress())) {
    -                return null;
    -            } else {
    -                return delegate.getHostGeoInfo(address);
    +            // Saw strange test failure on jenkins: hence paranoid logging, just in case
exception is swallowed somehow.
    +            HostGeoInfo result;
    +            try {
    +                if (HOMELESS_IP.equals(address.getHostAddress())) {
    +                    result = null;
    +                } else {
    +                    result = delegate.getHostGeoInfo(address);
    +                }
    +                LOG.info("StubHostGeoLookup.getHostGeoInfo queried: address="+address+";
hostAddress="+address.getHostAddress()+"; result="+result);
    +                return result;
    +            } catch (Throwable t) {
    --- End diff --
    
    It's just for logging, so meh. But declaring `result` outside the `try`-`catch` doesn't
seem to be needed?


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