Search in sources :

Example 1 with EmbeddedSingleNodeKafkaCluster

use of io.confluent.ksql.testutils.EmbeddedSingleNodeKafkaCluster in project ksql by confluentinc.

the class IntegrationTestHarness method start.

public void start() throws Exception {
    embeddedKafkaCluster = new EmbeddedSingleNodeKafkaCluster();
    embeddedKafkaCluster.start();
    Map<String, Object> configMap = new HashMap<>();
    configMap.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, embeddedKafkaCluster.bootstrapServers());
    configMap.put("application.id", "KSQL");
    configMap.put("commit.interval.ms", 0);
    configMap.put("cache.max.bytes.buffering", 0);
    configMap.put("auto.offset.reset", "earliest");
    configMap.put(StreamsConfig.STATE_DIR_CONFIG, TestUtils.tempDirectory().getPath());
    this.ksqlConfig = new KsqlConfig(configMap);
    this.adminClient = AdminClient.create(ksqlConfig.getKsqlAdminClientConfigProps());
    this.topicClient = new KafkaTopicClientImpl(adminClient);
}
Also used : EmbeddedSingleNodeKafkaCluster(io.confluent.ksql.testutils.EmbeddedSingleNodeKafkaCluster) HashMap(java.util.HashMap) KsqlConfig(io.confluent.ksql.util.KsqlConfig) KafkaTopicClientImpl(io.confluent.ksql.util.KafkaTopicClientImpl)

Aggregations

EmbeddedSingleNodeKafkaCluster (io.confluent.ksql.testutils.EmbeddedSingleNodeKafkaCluster)1 KafkaTopicClientImpl (io.confluent.ksql.util.KafkaTopicClientImpl)1 KsqlConfig (io.confluent.ksql.util.KsqlConfig)1 HashMap (java.util.HashMap)1