Search in sources :

Example 6 with BackOff

use of io.strimzi.operator.common.BackOff in project strimzi by strimzi.

the class ZookeeperLeaderFinderTest method testSecretsCorrupted.

@Test
public void testSecretsCorrupted(VertxTestContext context) {
    SecretOperator mock = mock(SecretOperator.class);
    ZookeeperLeaderFinder finder = new ZookeeperLeaderFinder(vertx, this::backoff);
    when(mock.getAsync(eq(NAMESPACE), eq(KafkaResources.clusterCaCertificateSecretName(CLUSTER)))).thenReturn(Future.succeededFuture(new SecretBuilder().withNewMetadata().withName(KafkaResources.clusterCaCertificateSecretName(CLUSTER)).withNamespace(NAMESPACE).endMetadata().withData(map(Ca.CA_CRT, "notacert")).build()));
    Secret secretWithBadCertificate = new SecretBuilder().withNewMetadata().withName(ClusterOperator.secretName(CLUSTER)).withNamespace(NAMESPACE).endMetadata().withData(map("cluster-operator.key", "notacert", "cluster-operator.crt", "notacert", "cluster-operator.p12", "notatruststore", "cluster-operator.password", "notapassword")).build();
    Checkpoint a = context.checkpoint();
    finder.findZookeeperLeader(Reconciliation.DUMMY_RECONCILIATION, treeSet(createPodWithId(0), createPodWithId(1)), dummySecret(), secretWithBadCertificate).onComplete(context.failing(e -> context.verify(() -> {
        assertThat(e, instanceOf(RuntimeException.class));
        assertThat(e.getMessage(), is("Bad/corrupt certificate found in data.cluster-operator\\.crt of Secret testcluster-cluster-operator-certs in namespace testns"));
        a.flag();
    })));
}
Also used : SecretOperator(io.strimzi.operator.common.operator.resource.SecretOperator) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) Secret(io.fabric8.kubernetes.api.model.Secret) CoreMatchers.is(org.hamcrest.CoreMatchers.is) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) BiFunction(java.util.function.BiFunction) AfterAll(org.junit.jupiter.api.AfterAll) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) PodBuilder(io.fabric8.kubernetes.api.model.PodBuilder) KafkaResources(io.strimzi.api.kafka.model.KafkaResources) Ca(io.strimzi.operator.cluster.model.Ca) BeforeAll(org.junit.jupiter.api.BeforeAll) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) SecretOperator(io.strimzi.operator.common.operator.resource.SecretOperator) Set(java.util.Set) VertxExtension(io.vertx.junit5.VertxExtension) Future(io.vertx.core.Future) NetClientOptions(io.vertx.core.net.NetClientOptions) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) NetServerOptions(io.vertx.core.net.NetServerOptions) List(java.util.List) Labels(io.strimzi.operator.common.model.Labels) Logger(org.apache.logging.log4j.Logger) Secret(io.fabric8.kubernetes.api.model.Secret) Checkpoint(io.vertx.junit5.Checkpoint) Mockito.mock(org.mockito.Mockito.mock) VertxTestContext(io.vertx.junit5.VertxTestContext) BackOff(io.strimzi.operator.common.BackOff) SelfSignedCertificate(io.vertx.core.net.SelfSignedCertificate) ZookeeperCluster(io.strimzi.operator.cluster.model.ZookeeperCluster) Function(java.util.function.Function) Supplier(java.util.function.Supplier) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) ClusterOperator(io.strimzi.operator.cluster.ClusterOperator) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) TestUtils.map(io.strimzi.test.TestUtils.map) Collections.emptyMap(java.util.Collections.emptyMap) Collections.emptySet(java.util.Collections.emptySet) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) Pod(io.fabric8.kubernetes.api.model.Pod) Mockito.when(org.mockito.Mockito.when) Integer.parseInt(java.lang.Integer.parseInt) TimeUnit(java.util.concurrent.TimeUnit) Reconciliation(io.strimzi.operator.common.Reconciliation) Mockito(org.mockito.Mockito) AfterEach(org.junit.jupiter.api.AfterEach) NetServer(io.vertx.core.net.NetServer) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) LogManager(org.apache.logging.log4j.LogManager) Checkpoint(io.vertx.junit5.Checkpoint) Test(org.junit.jupiter.api.Test)

Example 7 with BackOff

use of io.strimzi.operator.common.BackOff in project strimzi by strimzi.

the class ZookeeperLeaderFinderTest method testSecretWithMissingClusterOperatorKeyThrowsException.

@Test
public void testSecretWithMissingClusterOperatorKeyThrowsException(VertxTestContext context) {
    SecretOperator mock = mock(SecretOperator.class);
    ZookeeperLeaderFinder finder = new ZookeeperLeaderFinder(vertx, this::backoff);
    Mockito.reset(mock);
    when(mock.getAsync(eq(NAMESPACE), eq(KafkaResources.clusterCaCertificateSecretName(CLUSTER)))).thenReturn(Future.succeededFuture(new SecretBuilder().withNewMetadata().withName(KafkaResources.clusterCaCertificateSecretName(CLUSTER)).withNamespace(NAMESPACE).endMetadata().withData(emptyMap()).build()));
    Secret secretWithMissingClusterOperatorKey = new SecretBuilder().withNewMetadata().withName(ClusterOperator.secretName(CLUSTER)).withNamespace(NAMESPACE).endMetadata().withData(emptyMap()).build();
    Checkpoint a = context.checkpoint();
    finder.findZookeeperLeader(Reconciliation.DUMMY_RECONCILIATION, treeSet(createPodWithId(0), createPodWithId(1)), dummySecret(), secretWithMissingClusterOperatorKey).onComplete(context.failing(e -> context.verify(() -> {
        assertThat(e, instanceOf(RuntimeException.class));
        assertThat(e.getMessage(), is("The Secret testns/testcluster-cluster-operator-certs is missing the key cluster-operator.key"));
        a.flag();
    })));
}
Also used : SecretOperator(io.strimzi.operator.common.operator.resource.SecretOperator) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) Secret(io.fabric8.kubernetes.api.model.Secret) CoreMatchers.is(org.hamcrest.CoreMatchers.is) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) BiFunction(java.util.function.BiFunction) AfterAll(org.junit.jupiter.api.AfterAll) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) PodBuilder(io.fabric8.kubernetes.api.model.PodBuilder) KafkaResources(io.strimzi.api.kafka.model.KafkaResources) Ca(io.strimzi.operator.cluster.model.Ca) BeforeAll(org.junit.jupiter.api.BeforeAll) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) SecretOperator(io.strimzi.operator.common.operator.resource.SecretOperator) Set(java.util.Set) VertxExtension(io.vertx.junit5.VertxExtension) Future(io.vertx.core.Future) NetClientOptions(io.vertx.core.net.NetClientOptions) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) NetServerOptions(io.vertx.core.net.NetServerOptions) List(java.util.List) Labels(io.strimzi.operator.common.model.Labels) Logger(org.apache.logging.log4j.Logger) Secret(io.fabric8.kubernetes.api.model.Secret) Checkpoint(io.vertx.junit5.Checkpoint) Mockito.mock(org.mockito.Mockito.mock) VertxTestContext(io.vertx.junit5.VertxTestContext) BackOff(io.strimzi.operator.common.BackOff) SelfSignedCertificate(io.vertx.core.net.SelfSignedCertificate) ZookeeperCluster(io.strimzi.operator.cluster.model.ZookeeperCluster) Function(java.util.function.Function) Supplier(java.util.function.Supplier) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) ClusterOperator(io.strimzi.operator.cluster.ClusterOperator) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) TestUtils.map(io.strimzi.test.TestUtils.map) Collections.emptyMap(java.util.Collections.emptyMap) Collections.emptySet(java.util.Collections.emptySet) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) Pod(io.fabric8.kubernetes.api.model.Pod) Mockito.when(org.mockito.Mockito.when) Integer.parseInt(java.lang.Integer.parseInt) TimeUnit(java.util.concurrent.TimeUnit) Reconciliation(io.strimzi.operator.common.Reconciliation) Mockito(org.mockito.Mockito) AfterEach(org.junit.jupiter.api.AfterEach) NetServer(io.vertx.core.net.NetServer) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) LogManager(org.apache.logging.log4j.LogManager) Checkpoint(io.vertx.junit5.Checkpoint) Test(org.junit.jupiter.api.Test)

Example 8 with BackOff

use of io.strimzi.operator.common.BackOff in project strimzi by strimzi.

the class ZookeeperLeaderFinderTest method testLeaderFoundFirstAttempt.

@Test
public void testLeaderFoundFirstAttempt(VertxTestContext context) throws InterruptedException {
    int leader = 1;
    String leaderPod = "my-cluster-kafka-1";
    int[] ports = startMockZks(context, 2, (id, attempt) -> id == leader);
    ZookeeperLeaderFinder finder = new TestingZookeeperLeaderFinder(this::backoff, ports);
    Checkpoint a = context.checkpoint();
    finder.findZookeeperLeader(Reconciliation.DUMMY_RECONCILIATION, treeSet(createPodWithId(0), createPodWithId(1)), dummySecret(), dummySecret()).onComplete(context.succeeding(l -> context.verify(() -> {
        assertThat(l, is(leaderPod));
        for (FakeZk zk : zks) {
            assertThat("Unexpected number of attempts for node " + zk.id, zk.attempts.get(), is(1));
        }
        a.flag();
    })));
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) BiFunction(java.util.function.BiFunction) AfterAll(org.junit.jupiter.api.AfterAll) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) PodBuilder(io.fabric8.kubernetes.api.model.PodBuilder) KafkaResources(io.strimzi.api.kafka.model.KafkaResources) Ca(io.strimzi.operator.cluster.model.Ca) BeforeAll(org.junit.jupiter.api.BeforeAll) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) SecretOperator(io.strimzi.operator.common.operator.resource.SecretOperator) Set(java.util.Set) VertxExtension(io.vertx.junit5.VertxExtension) Future(io.vertx.core.Future) NetClientOptions(io.vertx.core.net.NetClientOptions) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) NetServerOptions(io.vertx.core.net.NetServerOptions) List(java.util.List) Labels(io.strimzi.operator.common.model.Labels) Logger(org.apache.logging.log4j.Logger) Secret(io.fabric8.kubernetes.api.model.Secret) Checkpoint(io.vertx.junit5.Checkpoint) Mockito.mock(org.mockito.Mockito.mock) VertxTestContext(io.vertx.junit5.VertxTestContext) BackOff(io.strimzi.operator.common.BackOff) SelfSignedCertificate(io.vertx.core.net.SelfSignedCertificate) ZookeeperCluster(io.strimzi.operator.cluster.model.ZookeeperCluster) Function(java.util.function.Function) Supplier(java.util.function.Supplier) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) ClusterOperator(io.strimzi.operator.cluster.ClusterOperator) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) TestUtils.map(io.strimzi.test.TestUtils.map) Collections.emptyMap(java.util.Collections.emptyMap) Collections.emptySet(java.util.Collections.emptySet) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) Pod(io.fabric8.kubernetes.api.model.Pod) Mockito.when(org.mockito.Mockito.when) Integer.parseInt(java.lang.Integer.parseInt) TimeUnit(java.util.concurrent.TimeUnit) Reconciliation(io.strimzi.operator.common.Reconciliation) Mockito(org.mockito.Mockito) AfterEach(org.junit.jupiter.api.AfterEach) NetServer(io.vertx.core.net.NetServer) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) LogManager(org.apache.logging.log4j.LogManager) Checkpoint(io.vertx.junit5.Checkpoint) Checkpoint(io.vertx.junit5.Checkpoint) Test(org.junit.jupiter.api.Test)

Example 9 with BackOff

use of io.strimzi.operator.common.BackOff in project strimzi by strimzi.

the class ZookeeperLeaderFinderTest method testReturnUnknownLeaderDuringNetworkExceptions.

@Test
public void testReturnUnknownLeaderDuringNetworkExceptions(VertxTestContext context) throws InterruptedException {
    int[] ports = startMockZks(context, 2, (id, attempt) -> false);
    // Close ports to ensure closed ports are used so as to mock network problems
    stopZks();
    ZookeeperLeaderFinder finder = new TestingZookeeperLeaderFinder(this::backoff, ports);
    Checkpoint a = context.checkpoint();
    finder.findZookeeperLeader(Reconciliation.DUMMY_RECONCILIATION, treeSet(createPodWithId(0), createPodWithId(1)), dummySecret(), dummySecret()).onComplete(context.succeeding(leader -> context.verify(() -> {
        assertThat(leader, is(ZookeeperLeaderFinder.UNKNOWN_LEADER));
        for (FakeZk zk : zks) {
            assertThat("Unexpected number of attempts for node " + zk.id, zk.attempts.get(), is(0));
        }
        a.flag();
    })));
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) BiFunction(java.util.function.BiFunction) AfterAll(org.junit.jupiter.api.AfterAll) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) PodBuilder(io.fabric8.kubernetes.api.model.PodBuilder) KafkaResources(io.strimzi.api.kafka.model.KafkaResources) Ca(io.strimzi.operator.cluster.model.Ca) BeforeAll(org.junit.jupiter.api.BeforeAll) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) SecretOperator(io.strimzi.operator.common.operator.resource.SecretOperator) Set(java.util.Set) VertxExtension(io.vertx.junit5.VertxExtension) Future(io.vertx.core.Future) NetClientOptions(io.vertx.core.net.NetClientOptions) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) NetServerOptions(io.vertx.core.net.NetServerOptions) List(java.util.List) Labels(io.strimzi.operator.common.model.Labels) Logger(org.apache.logging.log4j.Logger) Secret(io.fabric8.kubernetes.api.model.Secret) Checkpoint(io.vertx.junit5.Checkpoint) Mockito.mock(org.mockito.Mockito.mock) VertxTestContext(io.vertx.junit5.VertxTestContext) BackOff(io.strimzi.operator.common.BackOff) SelfSignedCertificate(io.vertx.core.net.SelfSignedCertificate) ZookeeperCluster(io.strimzi.operator.cluster.model.ZookeeperCluster) Function(java.util.function.Function) Supplier(java.util.function.Supplier) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) ClusterOperator(io.strimzi.operator.cluster.ClusterOperator) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) TestUtils.map(io.strimzi.test.TestUtils.map) Collections.emptyMap(java.util.Collections.emptyMap) Collections.emptySet(java.util.Collections.emptySet) Promise(io.vertx.core.Promise) Vertx(io.vertx.core.Vertx) Pod(io.fabric8.kubernetes.api.model.Pod) Mockito.when(org.mockito.Mockito.when) Integer.parseInt(java.lang.Integer.parseInt) TimeUnit(java.util.concurrent.TimeUnit) Reconciliation(io.strimzi.operator.common.Reconciliation) Mockito(org.mockito.Mockito) AfterEach(org.junit.jupiter.api.AfterEach) NetServer(io.vertx.core.net.NetServer) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) LogManager(org.apache.logging.log4j.LogManager) Checkpoint(io.vertx.junit5.Checkpoint) Test(org.junit.jupiter.api.Test)

Example 10 with BackOff

use of io.strimzi.operator.common.BackOff in project strimzi-kafka-operator by strimzi.

the class ConnectorMockTest method setup.

@SuppressWarnings({ "checkstyle:MethodLength" })
@BeforeEach
public void setup(VertxTestContext testContext) {
    vertx = Vertx.vertx();
    client = new MockKube().withCustomResourceDefinition(Crds.kafkaConnect(), KafkaConnect.class, KafkaConnectList.class, KafkaConnect::getStatus, KafkaConnect::setStatus).end().withCustomResourceDefinition(Crds.kafkaConnector(), KafkaConnector.class, KafkaConnectorList.class, KafkaConnector::getStatus, KafkaConnector::setStatus).end().build();
    PlatformFeaturesAvailability pfa = new PlatformFeaturesAvailability(true, KubernetesVersion.V1_18);
    setupMockConnectAPI();
    ResourceOperatorSupplier ros = new ResourceOperatorSupplier(vertx, client, new ZookeeperLeaderFinder(vertx, // Retry up to 3 times (4 attempts), with overall max delay of 35000ms
    () -> new BackOff(5_000, 2, 4)), new DefaultAdminClientProvider(), new DefaultZookeeperScalerProvider(), ResourceUtils.metricsProvider(), pfa, FeatureGates.NONE, 10_000);
    ClusterOperatorConfig config = ClusterOperatorConfig.fromMap(map(ClusterOperatorConfig.STRIMZI_KAFKA_IMAGES, KafkaVersionTestUtils.getKafkaImagesEnvVarString(), ClusterOperatorConfig.STRIMZI_KAFKA_CONNECT_IMAGES, KafkaVersionTestUtils.getKafkaConnectImagesEnvVarString(), ClusterOperatorConfig.STRIMZI_KAFKA_MIRROR_MAKER_2_IMAGES, KafkaVersionTestUtils.getKafkaMirrorMaker2ImagesEnvVarString(), ClusterOperatorConfig.STRIMZI_FULL_RECONCILIATION_INTERVAL_MS, Long.toString(Long.MAX_VALUE)), KafkaVersionTestUtils.getKafkaVersionLookup());
    kafkaConnectOperator = new KafkaConnectAssemblyOperator(vertx, pfa, ros, config, x -> api);
    Checkpoint async = testContext.checkpoint();
    // Fail test if watcher closes for any reason
    kafkaConnectOperator.createWatch(NAMESPACE, e -> testContext.failNow(e)).onComplete(testContext.succeeding()).compose(watch -> AbstractConnectOperator.createConnectorWatch(kafkaConnectOperator, NAMESPACE, null)).onComplete(testContext.succeeding(v -> async.flag()));
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) KafkaConnectorList(io.strimzi.api.kafka.KafkaConnectorList) BeforeEach(org.junit.jupiter.api.BeforeEach) ConnectorPluginBuilder(io.strimzi.api.kafka.model.connect.ConnectorPluginBuilder) OrderedProperties(io.strimzi.operator.common.model.OrderedProperties) TestUtils.waitFor(io.strimzi.test.TestUtils.waitFor) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Annotations(io.strimzi.operator.common.Annotations) TimeoutException(java.util.concurrent.TimeoutException) KafkaConnector(io.strimzi.api.kafka.model.KafkaConnector) MockKube(io.strimzi.test.mockkube.MockKube) Collections.singletonList(java.util.Collections.singletonList) Resource(io.fabric8.kubernetes.client.dsl.Resource) DefaultAdminClientProvider(io.strimzi.operator.common.DefaultAdminClientProvider) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Map(java.util.Map) Mockito.atLeast(org.mockito.Mockito.atLeast) ResourceOperatorSupplier(io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier) JsonObject(io.vertx.core.json.JsonObject) ResourceUtils(io.strimzi.operator.cluster.ResourceUtils) KafkaConnect(io.strimzi.api.kafka.model.KafkaConnect) ConnectTimeoutException(io.netty.channel.ConnectTimeoutException) Predicate(java.util.function.Predicate) Mockito.atLeastOnce(org.mockito.Mockito.atLeastOnce) KafkaConnectBuilder(io.strimzi.api.kafka.model.KafkaConnectBuilder) VertxExtension(io.vertx.junit5.VertxExtension) Future(io.vertx.core.Future) Collectors(java.util.stream.Collectors) Test(org.junit.jupiter.api.Test) Objects(java.util.Objects) KafkaConnectCluster(io.strimzi.operator.cluster.model.KafkaConnectCluster) List(java.util.List) Labels(io.strimzi.operator.common.model.Labels) Logger(org.apache.logging.log4j.Logger) Checkpoint(io.vertx.junit5.Checkpoint) Condition(io.strimzi.api.kafka.model.status.Condition) KafkaConnectList(io.strimzi.api.kafka.KafkaConnectList) PlatformFeaturesAvailability(io.strimzi.operator.PlatformFeaturesAvailability) ClusterOperatorConfig(io.strimzi.operator.cluster.ClusterOperatorConfig) CustomResource(io.fabric8.kubernetes.client.CustomResource) Mockito.mock(org.mockito.Mockito.mock) VertxTestContext(io.vertx.junit5.VertxTestContext) Assertions.fail(org.junit.jupiter.api.Assertions.fail) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) BackOff(io.strimzi.operator.common.BackOff) HashMap(java.util.HashMap) Crds(io.strimzi.api.kafka.Crds) FeatureGates(io.strimzi.operator.cluster.FeatureGates) KafkaVersionTestUtils(io.strimzi.operator.cluster.KafkaVersionTestUtils) ZookeeperLeaderFinder(io.strimzi.operator.cluster.operator.resource.ZookeeperLeaderFinder) TestUtils(io.strimzi.test.TestUtils) Status(io.strimzi.api.kafka.model.status.Status) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) ArgumentMatchers.anyInt(org.mockito.ArgumentMatchers.anyInt) KafkaConnectorBuilder(io.strimzi.api.kafka.model.KafkaConnectorBuilder) TestUtils.map(io.strimzi.test.TestUtils.map) Collections.emptyMap(java.util.Collections.emptyMap) Matchers.empty(org.hamcrest.Matchers.empty) KubernetesVersion(io.strimzi.operator.KubernetesVersion) Vertx(io.vertx.core.Vertx) ConnectorPlugin(io.strimzi.api.kafka.model.connect.ConnectorPlugin) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) Reconciliation(io.strimzi.operator.common.Reconciliation) AfterEach(org.junit.jupiter.api.AfterEach) Mockito.never(org.mockito.Mockito.never) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) DefaultZookeeperScalerProvider(io.strimzi.operator.cluster.operator.resource.DefaultZookeeperScalerProvider) LogManager(org.apache.logging.log4j.LogManager) Collections(java.util.Collections) KafkaConnectResources(io.strimzi.api.kafka.model.KafkaConnectResources) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) ClusterOperatorConfig(io.strimzi.operator.cluster.ClusterOperatorConfig) KafkaConnect(io.strimzi.api.kafka.model.KafkaConnect) BackOff(io.strimzi.operator.common.BackOff) ResourceOperatorSupplier(io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier) MockKube(io.strimzi.test.mockkube.MockKube) KafkaConnectorList(io.strimzi.api.kafka.KafkaConnectorList) Checkpoint(io.vertx.junit5.Checkpoint) PlatformFeaturesAvailability(io.strimzi.operator.PlatformFeaturesAvailability) KafkaConnector(io.strimzi.api.kafka.model.KafkaConnector) KafkaConnectList(io.strimzi.api.kafka.KafkaConnectList) ZookeeperLeaderFinder(io.strimzi.operator.cluster.operator.resource.ZookeeperLeaderFinder) DefaultZookeeperScalerProvider(io.strimzi.operator.cluster.operator.resource.DefaultZookeeperScalerProvider) DefaultAdminClientProvider(io.strimzi.operator.common.DefaultAdminClientProvider) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BackOff (io.strimzi.operator.common.BackOff)34 Reconciliation (io.strimzi.operator.common.Reconciliation)34 Future (io.vertx.core.Future)32 Vertx (io.vertx.core.Vertx)32 Checkpoint (io.vertx.junit5.Checkpoint)32 VertxExtension (io.vertx.junit5.VertxExtension)32 VertxTestContext (io.vertx.junit5.VertxTestContext)32 ExtendWith (org.junit.jupiter.api.extension.ExtendWith)32 AfterAll (org.junit.jupiter.api.AfterAll)30 BeforeAll (org.junit.jupiter.api.BeforeAll)30 Test (org.junit.jupiter.api.Test)30 List (java.util.List)24 MatcherAssert.assertThat (org.hamcrest.MatcherAssert.assertThat)24 AfterEach (org.junit.jupiter.api.AfterEach)24 Promise (io.vertx.core.Promise)22 LogManager (org.apache.logging.log4j.LogManager)22 Logger (org.apache.logging.log4j.Logger)22 CoreMatchers.is (org.hamcrest.CoreMatchers.is)22 Mockito.mock (org.mockito.Mockito.mock)22 Mockito.when (org.mockito.Mockito.when)22