You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by bostko <gi...@git.apache.org> on 2015/07/17 17:51:19 UTC

[GitHub] incubator-brooklyn pull request: Kafka - fix escaping

GitHub user bostko opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/756

    Kafka - fix escaping

    Fixed the addressed issues

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bostko/incubator-brooklyn kafka_support

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/756.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #756
    
----
commit 29bc6b80d5a402959897557fdf892a4fac572bde
Author: Valentin Aitken <va...@cloudsoftcorp.com>
Date:   2015-07-17T15:26:28Z

    Kafka - fix escaping

----


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

[GitHub] incubator-brooklyn pull request: Kafka - fix escaping

Posted by aledsage <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Kafka - fix escaping

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/756


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

[GitHub] incubator-brooklyn pull request: Kafka - fix escaping

Posted by neykov <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Kafka - fix escaping

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/756#issuecomment-124005017
  
    @bostko could you trigger a rebuild


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

[GitHub] incubator-brooklyn pull request: Kafka - fix escaping

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/756#issuecomment-122829287
  
    Looks good for merge.


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

[GitHub] incubator-brooklyn pull request: Kafka - fix escaping

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/756#issuecomment-124327738
  
    Thanks @bostko - and thanks @neykov for reviewing. Merging now.


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