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

    https://github.com/apache/incubator-brooklyn/pull/756#discussion_r34980653
  
    --- Diff: 
software/messaging/src/test/java/brooklyn/entity/messaging/kafka/KafkaIntegrationTest.java
 ---
    @@ -125,11 +125,17 @@ 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 Callable<Void>() {
    --- End diff --
    
    Can use `Runnable` in this case, won't need `return null` further down.


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