Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/756#discussion_r35395342
  
    --- Diff: 
software/messaging/src/test/java/brooklyn/entity/messaging/kafka/KafkaIntegrationTest.java
 ---
    @@ -125,11 +125,16 @@ public Void call() {
     
             Entities.dumpInfo(cluster);
     
    -        KafkaSupport support = new KafkaSupport(cluster);
    +        final KafkaSupport support = new KafkaSupport(cluster);
     
             support.sendMessage("brooklyn", "TEST_MESSAGE");
    -        Thread.sleep(Duration.seconds(5).toMilliseconds());
    -        String message = support.getMessage("brooklyn");
    -        assertEquals(message, "TEST_MESSAGE");
    +
    +        Asserts.succeedsEventually(MutableMap.of("timeout", 
Duration.FIVE_SECONDS), new Runnable() {
    --- End diff --
    
    My personal preference is to not bother configuring an explicit timeout (so 
it defaults to 30 seconds). Given they are not performance tests, I don't see 
the point in having a short(ish) timeout. On low-powered asf builds we've seen 
some unit tests take several seconds.
    
    Happy to merge as-is. You've improved it over the 5 second sleep, and left 
the time as it was. And this is an integration test, so shouldn't fail on a 
low-powered asf build server.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to