All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.playtika.testcontainer.kafka.checks.KafkaStatusCheck Maven / Gradle / Ivy

There is a newer version: 3.1.10
Show newest version
package com.playtika.testcontainer.kafka.checks;

import com.playtika.testcontainer.common.checks.AbstractCommandWaitStrategy;
import com.playtika.testcontainer.kafka.properties.KafkaConfigurationProperties;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RequiredArgsConstructor
public class KafkaStatusCheck extends AbstractCommandWaitStrategy {

    private static final String MIN_BROKERS_COUNT = "1";
    private static final String TIMEOUT_IN_SEC = "30";

    private final KafkaConfigurationProperties properties;

    @Override
    public String[] getCheckCommand() {
        return new String[] {
                "cub",
                "kafka-ready",
                MIN_BROKERS_COUNT,
                TIMEOUT_IN_SEC,
                "-b",
                String.format("localhost:%d", 9092)
        };
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy