brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikezaccardo <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Fix KafkaIntegrationTest tests
Date Tue, 14 Jul 2015 19:49:21 GMT
Github user mikezaccardo commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/742#discussion_r34611029
  
    --- Diff: software/messaging/src/test/java/brooklyn/entity/messaging/kafka/KafkaSupport.java
---
    @@ -55,15 +53,39 @@ public KafkaSupport(KafkaCluster cluster) {
          */
         public void sendMessage(String topic, String message) {
             ZooKeeperNode zookeeper = cluster.getZooKeeper();
    -        Properties props = new Properties();
    -        props.put("zk.connect", String.format("%s:%d", zookeeper.getAttribute(Attributes.HOSTNAME),
zookeeper.getZookeeperPort()));
    -        props.put("serializer.class", "kafka.serializer.StringEncoder");
    -        ProducerConfig config = new ProducerConfig(props);
    -
    -        Producer<String, String> producer = new Producer<String, String>(config);
    -        ProducerData<String, String> data = new ProducerData<String, String>(topic,
message);
    -        producer.send(data);
    -        producer.close();
    +        for(Entity e : cluster.getCluster().getChildren()) {
    --- End diff --
    
    Can this loop be omitted?


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