brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorbett <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #651: Test speedups
Date Fri, 05 May 2017 09:40:46 GMT
Github user sjcorbett commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/651#discussion_r114961921
  
    --- Diff: locations/jclouds/src/test/java/org/apache/brooklyn/location/jclouds/DefaultConnectivityResolverTest.java
---
    @@ -147,10 +149,9 @@ public void testResolveChecksCredentials() throws Exception {
             ConfigBag config = ConfigBag.newInstance(ImmutableMap.of(
                     JcloudsLocationConfig.LOOKUP_AWS_HOSTNAME, false,
                     JcloudsLocationConfig.WAIT_FOR_SSHABLE, "1ms",
    +                JcloudsLocationConfig.POLL_FOR_FIRST_REACHABLE_ADDRESS, "1ms",
                     JcloudsLocation.CUSTOM_CREDENTIALS, credential));
    -        ConnectivityResolverOptions options = newResolveOptions()
    -                .pollForReachableAddresses(Predicates.in(reachableIps), Duration.ONE_SECOND,
true)
    --- End diff --
    
    The reason the timeouts were so large was to ensure the tests passed on Jenkins (something
[other tests do the same thing for](https://github.com/apache/brooklyn-server/pull/663#discussion_r114291567)).
With a one millisecond timeout I think these tests will sporadically fail. Here's one that
affected PR 668:
    ```
    java.lang.AssertionError: expected [10.0.0.2:22] but found [10.0.0.1:22]
    	at org.apache.brooklyn.location.jclouds.DefaultConnectivityResolverTest.testResolveChecksCredentials(DefaultConnectivityResolverTest.java:161)
    Standard Output
    
    2017-05-04 19:54:38,459 INFO  TESTNG PASSED: "Surefire test" - org.apache.brooklyn.location.jclouds.DefaultConnectivityResolverTest.testObtainsHostnameFromAwsMachine()
finished in 52 ms
    2017-05-04 19:54:38,460 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - @AfterMethod
org.apache.brooklyn.location.jclouds.AbstractJcloudsStubbedUnitTest.tearDown()
    2017-05-04 19:54:38,462 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - @AfterMethod
org.apache.brooklyn.location.jclouds.AbstractJcloudsStubbedUnitTest.tearDown() finished in
2 ms
    2017-05-04 19:54:38,463 INFO  TESTNG INVOKING CONFIGURATION: "Surefire test" - @BeforeMethod
org.apache.brooklyn.location.jclouds.AbstractJcloudsStubbedUnitTest.setUp()
    2017-05-04 19:54:38,464 INFO  TESTNG PASSED CONFIGURATION: "Surefire test" - @BeforeMethod
org.apache.brooklyn.location.jclouds.AbstractJcloudsStubbedUnitTest.setUp() finished in 2
ms
    2017-05-04 19:54:38,465 INFO  TESTNG INVOKING: "Surefire test" - org.apache.brooklyn.location.jclouds.DefaultConnectivityResolverTest.testResolveChecksCredentials()
    2017-05-04 19:54:38,474 INFO  No Camp-YAML parser registered for parsing catalog item
DSL; skipping DSL-parsing
    2017-05-04 19:54:38,480 WARN  No context entity found in config or current task
    ```


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