Search in sources :

Example 1 with EmbeddedZookeeper

use of org.wildfly.camel.test.common.zookeeper.EmbeddedZookeeper in project wildfly-camel by wildfly-extras.

the class KafkaConsumerIntegrationTest method before.

@BeforeClass
public static void before() throws Exception {
    embeddedZookeeper = new EmbeddedZookeeper();
    List<Integer> kafkaPorts = Collections.singletonList(KAFKA_PORT);
    embeddedKafkaBroker = new EmbeddedKafkaBroker(embeddedZookeeper.getConnection(), new Properties(), kafkaPorts);
    embeddedZookeeper.startup(1, TimeUnit.SECONDS);
    System.out.println("### Embedded Zookeeper connection: " + embeddedZookeeper.getConnection());
    embeddedKafkaBroker.startup();
    System.out.println("### Embedded Kafka cluster broker list: " + embeddedKafkaBroker.getBrokerList());
}
Also used : EmbeddedZookeeper(org.wildfly.camel.test.common.zookeeper.EmbeddedZookeeper) Properties(java.util.Properties) EmbeddedKafkaBroker(org.wildfly.camel.test.common.kafka.EmbeddedKafkaBroker) BeforeClass(org.junit.BeforeClass)

Example 2 with EmbeddedZookeeper

use of org.wildfly.camel.test.common.zookeeper.EmbeddedZookeeper in project wildfly-camel by wildfly-extras.

the class KafkaProducerIntegrationTest method before.

@BeforeClass
public static void before() throws Exception {
    embeddedZookeeper = new EmbeddedZookeeper();
    List<Integer> kafkaPorts = Collections.singletonList(KAFKA_PORT);
    embeddedKafkaBroker = new EmbeddedKafkaBroker(embeddedZookeeper.getConnection(), new Properties(), kafkaPorts);
    embeddedZookeeper.startup(1, TimeUnit.SECONDS);
    System.out.println("### Embedded Zookeeper connection: " + embeddedZookeeper.getConnection());
    embeddedKafkaBroker.startup();
    System.out.println("### Embedded Kafka cluster broker list: " + embeddedKafkaBroker.getBrokerList());
}
Also used : EmbeddedZookeeper(org.wildfly.camel.test.common.zookeeper.EmbeddedZookeeper) Properties(java.util.Properties) EmbeddedKafkaBroker(org.wildfly.camel.test.common.kafka.EmbeddedKafkaBroker) BeforeClass(org.junit.BeforeClass)

Aggregations

Properties (java.util.Properties)2 BeforeClass (org.junit.BeforeClass)2 EmbeddedKafkaBroker (org.wildfly.camel.test.common.kafka.EmbeddedKafkaBroker)2 EmbeddedZookeeper (org.wildfly.camel.test.common.zookeeper.EmbeddedZookeeper)2