brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <>
Subject [GitHub] incubator-brooklyn pull request: Kafka - fix escaping
Date Fri, 24 Jul 2015 04:49:17 GMT
Github user aledsage commented on a diff in the pull request:
    --- Diff: software/messaging/src/test/java/brooklyn/entity/messaging/kafka/
    @@ -125,11 +125,16 @@ public Void call() {
    -        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 or file a JIRA ticket
with INFRA.

View raw message