Search in sources :

Example 6 with StrimziKafkaCluster

use of io.strimzi.test.container.StrimziKafkaCluster in project strimzi-kafka-operator by strimzi.

the class KafkaConnectApiTest method before.

@BeforeAll
public static void before() throws IOException {
    vertx = Vertx.vertx();
    final Map<String, String> kafkaClusterConfiguration = new HashMap<>();
    kafkaClusterConfiguration.put("zookeeper.connect", "zookeeper:2181");
    cluster = new StrimziKafkaCluster(3, 1, kafkaClusterConfiguration);
    cluster.start();
}
Also used : HashMap(java.util.HashMap) Matchers.emptyString(org.hamcrest.Matchers.emptyString) Matchers.containsString(org.hamcrest.Matchers.containsString) StrimziKafkaCluster(io.strimzi.test.container.StrimziKafkaCluster) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 7 with StrimziKafkaCluster

use of io.strimzi.test.container.StrimziKafkaCluster in project strimzi by strimzi.

the class TopicOperatorIT method beforeAll.

@BeforeAll
public void beforeAll() throws Exception {
    kafkaCluster = new StrimziKafkaCluster(numKafkaBrokers(), numKafkaBrokers(), kafkaClusterConfig());
    kafkaCluster.start();
    setupKubeCluster();
    setup(kafkaCluster);
    LOGGER.info("Using namespace {}", NAMESPACE);
    startTopicOperator(kafkaCluster);
}
Also used : StrimziKafkaCluster(io.strimzi.test.container.StrimziKafkaCluster) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 8 with StrimziKafkaCluster

use of io.strimzi.test.container.StrimziKafkaCluster in project strimzi by strimzi.

the class TopicStoreUpgradeTest method before.

@BeforeAll
public static void before() throws Exception {
    vertx = Vertx.vertx();
    Map<String, String> config = new HashMap<>();
    config.put("zookeeper.connect", "zookeeper:2181");
    cluster = new StrimziKafkaCluster(1, 1, config);
    cluster.start();
    MANDATORY_CONFIG.put(Config.KAFKA_BOOTSTRAP_SERVERS.key, cluster.getBootstrapServers());
    MANDATORY_CONFIG.put(Config.ZOOKEEPER_CONNECT.key, cluster.getZookeeper().getHost() + ":" + cluster.getZookeeper().getFirstMappedPort());
    ZkClient zkc = new ZkClient(cluster.getZookeeper().getHost() + ":" + cluster.getZookeeper().getFirstMappedPort());
    try {
        zkc.create("/strimzi", null, CreateMode.PERSISTENT);
        zkc.create("/strimzi/topics", null, CreateMode.PERSISTENT);
    } finally {
        zkc.close();
    }
}
Also used : ZkClient(org.I0Itec.zkclient.ZkClient) HashMap(java.util.HashMap) StrimziKafkaCluster(io.strimzi.test.container.StrimziKafkaCluster) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 9 with StrimziKafkaCluster

use of io.strimzi.test.container.StrimziKafkaCluster in project strimzi by strimzi.

the class TopicOperatorTopicDeletionDisabledIT method beforeAll.

@BeforeAll
public void beforeAll() throws Exception {
    kafkaCluster = new StrimziKafkaCluster(numKafkaBrokers(), numKafkaBrokers(), kafkaClusterConfig());
    kafkaCluster.start();
    setupKubeCluster();
    setup(kafkaCluster);
    startTopicOperator(kafkaCluster);
}
Also used : StrimziKafkaCluster(io.strimzi.test.container.StrimziKafkaCluster) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 10 with StrimziKafkaCluster

use of io.strimzi.test.container.StrimziKafkaCluster in project strimzi by strimzi.

the class KafkaConnectorIT method before.

@BeforeAll
public static void before() throws IOException {
    vertx = Vertx.vertx(new VertxOptions().setMetricsOptions(new MicrometerMetricsOptions().setPrometheusOptions(new VertxPrometheusOptions().setEnabled(true)).setEnabled(true)));
    final Map<String, String> kafkaClusterConfiguration = new HashMap<>();
    kafkaClusterConfiguration.put("zookeeper.connect", "zookeeper:2181");
    cluster = new StrimziKafkaCluster(3, 1, kafkaClusterConfiguration);
    cluster.start();
}
Also used : VertxPrometheusOptions(io.vertx.micrometer.VertxPrometheusOptions) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) StrimziKafkaCluster(io.strimzi.test.container.StrimziKafkaCluster) VertxOptions(io.vertx.core.VertxOptions) MicrometerMetricsOptions(io.vertx.micrometer.MicrometerMetricsOptions) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

StrimziKafkaCluster (io.strimzi.test.container.StrimziKafkaCluster)14 BeforeAll (org.junit.jupiter.api.BeforeAll)12 HashMap (java.util.HashMap)8 KafkaTopic (io.strimzi.api.kafka.model.KafkaTopic)2 MockKube (io.strimzi.test.mockkube.MockKube)2 VertxOptions (io.vertx.core.VertxOptions)2 Checkpoint (io.vertx.junit5.Checkpoint)2 MicrometerMetricsOptions (io.vertx.micrometer.MicrometerMetricsOptions)2 VertxPrometheusOptions (io.vertx.micrometer.VertxPrometheusOptions)2 LinkedHashMap (java.util.LinkedHashMap)2 ZkClient (org.I0Itec.zkclient.ZkClient)2 AdminClientConfig (org.apache.kafka.clients.admin.AdminClientConfig)2 Matchers.containsString (org.hamcrest.Matchers.containsString)2 Matchers.emptyString (org.hamcrest.Matchers.emptyString)2 BeforeEach (org.junit.jupiter.api.BeforeEach)2