Search in sources :

Example 51 with KafkaConnector

use of io.strimzi.api.kafka.model.KafkaConnector in project strimzi-kafka-operator by strimzi.

the class KafkaConnectorIT method test.

@Test
public void test(VertxTestContext context) {
    KafkaConnectApiImpl connectClient = new KafkaConnectApiImpl(vertx);
    PlatformFeaturesAvailability pfa = new PlatformFeaturesAvailability(false, KubernetesVersion.V1_20);
    String namespace = "ns";
    String connectorName = "my-connector";
    LinkedHashMap<String, Object> config = new LinkedHashMap<>();
    config.put(TestingConnector.START_TIME_MS, 1_000);
    config.put(TestingConnector.STOP_TIME_MS, 0);
    config.put(TestingConnector.TASK_START_TIME_MS, 1_000);
    config.put(TestingConnector.TASK_STOP_TIME_MS, 0);
    config.put(TestingConnector.TASK_POLL_TIME_MS, 1_000);
    config.put(TestingConnector.TASK_POLL_RECORDS, 100);
    config.put(TestingConnector.NUM_PARTITIONS, 1);
    config.put(TestingConnector.TOPIC_NAME, "my-topic");
    KafkaConnector connector = createKafkaConnector(namespace, connectorName, config);
    Crds.kafkaConnectorOperation(client).inNamespace(namespace).create(connector);
    MetricsProvider metrics = new MicrometerMetricsProvider();
    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(), metrics, pfa, 10_000);
    KafkaConnectAssemblyOperator operator = new KafkaConnectAssemblyOperator(vertx, pfa, ros, ClusterOperatorConfig.fromMap(Collections.emptyMap(), KafkaVersionTestUtils.getKafkaVersionLookup()), connect -> new KafkaConnectApiImpl(vertx), connectCluster.getPort(2)) {
    };
    Checkpoint async = context.checkpoint();
    operator.reconcileConnectorAndHandleResult(new Reconciliation("test", "KafkaConnect", namespace, "bogus"), "localhost", connectClient, true, connectorName, connector).onComplete(context.succeeding(v -> assertConnectorIsRunning(context, client, namespace, connectorName))).compose(v -> {
        config.remove(TestingConnector.START_TIME_MS, 1_000);
        config.put(TestingConnector.START_TIME_MS, 1_000);
        Crds.kafkaConnectorOperation(client).inNamespace(namespace).withName(connectorName).patch(createKafkaConnector(namespace, connectorName, config));
        return operator.reconcileConnectorAndHandleResult(new Reconciliation("test", "KafkaConnect", namespace, "bogus"), "localhost", connectClient, true, connectorName, connector);
    }).onComplete(context.succeeding(v -> context.verify(() -> {
        assertConnectorIsRunning(context, client, namespace, connectorName);
        // Assert metrics from Connector Operator
        MeterRegistry registry = metrics.meterRegistry();
        assertThat(registry.get(AbstractOperator.METRICS_PREFIX + "reconciliations").tag("kind", KafkaConnector.RESOURCE_KIND).counter().count(), CoreMatchers.is(2.0));
        assertThat(registry.get(AbstractOperator.METRICS_PREFIX + "reconciliations.successful").tag("kind", KafkaConnector.RESOURCE_KIND).counter().count(), CoreMatchers.is(2.0));
        assertThat(registry.get(AbstractOperator.METRICS_PREFIX + "reconciliations.duration").tag("kind", KafkaConnector.RESOURCE_KIND).timer().count(), CoreMatchers.is(2L));
        assertThat(registry.get(AbstractOperator.METRICS_PREFIX + "reconciliations.duration").tag("kind", KafkaConnector.RESOURCE_KIND).timer().totalTime(TimeUnit.MILLISECONDS), greaterThan(0.0));
        async.flag();
    })));
}
Also used : VertxTestContext(io.vertx.junit5.VertxTestContext) CoreMatchers(org.hamcrest.CoreMatchers) BeforeEach(org.junit.jupiter.api.BeforeEach) BackOff(io.strimzi.operator.common.BackOff) HashMap(java.util.HashMap) Crds(io.strimzi.api.kafka.Crds) KafkaConnector(io.strimzi.api.kafka.model.KafkaConnector) AfterAll(org.junit.jupiter.api.AfterAll) LinkedHashMap(java.util.LinkedHashMap) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) MicrometerMetricsOptions(io.vertx.micrometer.MicrometerMetricsOptions) DefaultAdminClientProvider(io.strimzi.operator.common.DefaultAdminClientProvider) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) EnableKubernetesMockClient(io.fabric8.kubernetes.client.server.mock.EnableKubernetesMockClient) KafkaVersionTestUtils(io.strimzi.operator.cluster.KafkaVersionTestUtils) BeforeAll(org.junit.jupiter.api.BeforeAll) Map(java.util.Map) ZookeeperLeaderFinder(io.strimzi.operator.cluster.operator.resource.ZookeeperLeaderFinder) ResourceOperatorSupplier(io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) MockKube2(io.strimzi.test.mockkube2.MockKube2) StrimziKafkaCluster(io.strimzi.test.container.StrimziKafkaCluster) KafkaConnectorBuilder(io.strimzi.api.kafka.model.KafkaConnectorBuilder) AbstractOperator(io.strimzi.operator.common.AbstractOperator) Matchers.notNullValue(org.hamcrest.Matchers.notNullValue) KubernetesVersion(io.strimzi.operator.KubernetesVersion) MetricsProvider(io.strimzi.operator.common.MetricsProvider) MicrometerMetricsProvider(io.strimzi.operator.common.MicrometerMetricsProvider) Vertx(io.vertx.core.Vertx) VertxOptions(io.vertx.core.VertxOptions) IOException(java.io.IOException) VertxPrometheusOptions(io.vertx.micrometer.VertxPrometheusOptions) VertxExtension(io.vertx.junit5.VertxExtension) Test(org.junit.jupiter.api.Test) TimeUnit(java.util.concurrent.TimeUnit) Reconciliation(io.strimzi.operator.common.Reconciliation) AfterEach(org.junit.jupiter.api.AfterEach) MeterRegistry(io.micrometer.core.instrument.MeterRegistry) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) Checkpoint(io.vertx.junit5.Checkpoint) Matchers.greaterThan(org.hamcrest.Matchers.greaterThan) Matchers.is(org.hamcrest.Matchers.is) DefaultZookeeperScalerProvider(io.strimzi.operator.cluster.operator.resource.DefaultZookeeperScalerProvider) PlatformFeaturesAvailability(io.strimzi.operator.PlatformFeaturesAvailability) Collections(java.util.Collections) ClusterOperatorConfig(io.strimzi.operator.cluster.ClusterOperatorConfig) BackOff(io.strimzi.operator.common.BackOff) LinkedHashMap(java.util.LinkedHashMap) MeterRegistry(io.micrometer.core.instrument.MeterRegistry) ResourceOperatorSupplier(io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier) Checkpoint(io.vertx.junit5.Checkpoint) PlatformFeaturesAvailability(io.strimzi.operator.PlatformFeaturesAvailability) Reconciliation(io.strimzi.operator.common.Reconciliation) MicrometerMetricsProvider(io.strimzi.operator.common.MicrometerMetricsProvider) KafkaConnector(io.strimzi.api.kafka.model.KafkaConnector) ZookeeperLeaderFinder(io.strimzi.operator.cluster.operator.resource.ZookeeperLeaderFinder) DefaultZookeeperScalerProvider(io.strimzi.operator.cluster.operator.resource.DefaultZookeeperScalerProvider) MetricsProvider(io.strimzi.operator.common.MetricsProvider) MicrometerMetricsProvider(io.strimzi.operator.common.MicrometerMetricsProvider) DefaultAdminClientProvider(io.strimzi.operator.common.DefaultAdminClientProvider) Test(org.junit.jupiter.api.Test)

Example 52 with KafkaConnector

use of io.strimzi.api.kafka.model.KafkaConnector in project strimzi-kafka-operator by strimzi.

the class KafkaConnectorIT method assertConnectorIsRunning.

private void assertConnectorIsRunning(VertxTestContext context, KubernetesClient client, String namespace, String connectorName) {
    context.verify(() -> {
        KafkaConnector kafkaConnector = Crds.kafkaConnectorOperation(client).inNamespace(namespace).withName(connectorName).get();
        assertThat(kafkaConnector, notNullValue());
        assertThat(kafkaConnector.getStatus(), notNullValue());
        assertThat(kafkaConnector.getStatus().getTasksMax(), is(1));
        assertThat(kafkaConnector.getStatus().getConnectorStatus(), notNullValue());
        assertThat(kafkaConnector.getStatus().getConnectorStatus().get("connector"), instanceOf(Map.class));
        assertThat(((Map) kafkaConnector.getStatus().getConnectorStatus().get("connector")).get("state"), is("RUNNING"));
    });
}
Also used : KafkaConnector(io.strimzi.api.kafka.model.KafkaConnector) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map)

Example 53 with KafkaConnector

use of io.strimzi.api.kafka.model.KafkaConnector in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class DebeziumOperandController method status.

@Override
public void status(ManagedConnector connector) {
    KafkaConnector kctr = lookupConnector(getKubernetesClient(), connector).filter(_kctr -> _kctr.getStatus() != null).orElse(null);
    KafkaConnect kc = lookupKafkaConnect(getKubernetesClient(), connector).filter(_kc -> _kc.getStatus() != null).orElse(null);
    computeStatus(connector.getStatus().getConnectorStatus(), kc, kctr);
}
Also used : Quantity(io.fabric8.kubernetes.api.model.Quantity) Secrets(org.bf2.cos.fleetshard.support.resources.Secrets) ExternalConfigurationBuilder(io.strimzi.api.kafka.model.connect.ExternalConfigurationBuilder) LoggerFactory(org.slf4j.LoggerFactory) KAFKA_CLIENT_SECRET_KEY(org.bf2.cos.fleetshard.operator.debezium.DebeziumConstants.KAFKA_CLIENT_SECRET_KEY) KafkaConnector(io.strimzi.api.kafka.model.KafkaConnector) KeyAndValueConverters(org.bf2.cos.fleetshard.operator.debezium.model.KeyAndValueConverters) Map(java.util.Map) CollectionUtils.asBytesBase64(org.bf2.cos.fleetshard.support.CollectionUtils.asBytesBase64) DebeziumOperandSupport.computeStatus(org.bf2.cos.fleetshard.operator.debezium.DebeziumOperandSupport.computeStatus) ManagedConnector(org.bf2.cos.fleetshard.api.ManagedConnector) ConnectorConfiguration(org.bf2.cos.fleetshard.operator.connector.ConnectorConfiguration) SecretVolumeSourceBuilder(io.fabric8.kubernetes.api.model.SecretVolumeSourceBuilder) KafkaConnect(io.strimzi.api.kafka.model.KafkaConnect) ExternalConfigurationVolumeSourceBuilder(io.strimzi.api.kafka.model.connect.ExternalConfigurationVolumeSourceBuilder) KafkaConnectBuilder(io.strimzi.api.kafka.model.KafkaConnectBuilder) ServiceAccountSpec(org.bf2.cos.fleetshard.api.ServiceAccountSpec) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) StandardCharsets(java.nio.charset.StandardCharsets) Objects(java.util.Objects) List(java.util.List) PasswordSecretSourceBuilder(io.strimzi.api.kafka.model.PasswordSecretSourceBuilder) Secret(io.fabric8.kubernetes.api.model.Secret) KafkaConnectTemplateBuilder(io.strimzi.api.kafka.model.template.KafkaConnectTemplateBuilder) EXTERNAL_CONFIG_FILE(org.bf2.cos.fleetshard.operator.debezium.DebeziumConstants.EXTERNAL_CONFIG_FILE) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings) RESOURCE_TYPES(org.bf2.cos.fleetshard.operator.debezium.DebeziumConstants.RESOURCE_TYPES) DebeziumDataShape(org.bf2.cos.fleetshard.operator.debezium.model.DebeziumDataShape) EXTERNAL_CONFIG_DIRECTORY(org.bf2.cos.fleetshard.operator.debezium.DebeziumConstants.EXTERNAL_CONFIG_DIRECTORY) ResourceRequirementsBuilder(io.fabric8.kubernetes.api.model.ResourceRequirementsBuilder) Singleton(javax.inject.Singleton) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) KafkaClientAuthenticationPlainBuilder(io.strimzi.api.kafka.model.authentication.KafkaClientAuthenticationPlainBuilder) LinkedHashMap(java.util.LinkedHashMap) KafkaConnectSpecBuilder(io.strimzi.api.kafka.model.KafkaConnectSpecBuilder) ExternalConfigurationReferenceBuilder(io.strimzi.api.kafka.model.ExternalConfigurationReferenceBuilder) JmxPrometheusExporterMetricsBuilder(io.strimzi.api.kafka.model.JmxPrometheusExporterMetricsBuilder) STRIMZI_IO_USE_CONNECTOR_RESOURCES(org.bf2.cos.fleetshard.operator.debezium.DebeziumConstants.STRIMZI_IO_USE_CONNECTOR_RESOURCES) DebeziumOperandSupport.lookupKafkaConnect(org.bf2.cos.fleetshard.operator.debezium.DebeziumOperandSupport.lookupKafkaConnect) ObjectMetaBuilder(io.fabric8.kubernetes.api.model.ObjectMetaBuilder) KafkaConnectorBuilder(io.strimzi.api.kafka.model.KafkaConnectorBuilder) Logger(org.slf4j.Logger) AbstractOperandController(org.bf2.cos.fleetshard.operator.operand.AbstractOperandController) IOException(java.io.IOException) STRIMZI_DOMAIN(org.bf2.cos.fleetshard.operator.debezium.DebeziumConstants.STRIMZI_DOMAIN) PodTemplateBuilder(io.strimzi.api.kafka.model.template.PodTemplateBuilder) DebeziumOperandSupport.createSecretsData(org.bf2.cos.fleetshard.operator.debezium.DebeziumOperandSupport.createSecretsData) ConfigMap(io.fabric8.kubernetes.api.model.ConfigMap) ConfigMapBuilder(io.fabric8.kubernetes.api.model.ConfigMapBuilder) ClientTlsBuilder(io.strimzi.api.kafka.model.ClientTlsBuilder) DebeziumOperandSupport.lookupConnector(org.bf2.cos.fleetshard.operator.debezium.DebeziumOperandSupport.lookupConnector) TreeMap(java.util.TreeMap) Constants(io.strimzi.api.kafka.model.Constants) KubernetesClient(io.fabric8.kubernetes.client.KubernetesClient) ResourceDefinitionContext(io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext) SecretBuilder(io.fabric8.kubernetes.api.model.SecretBuilder) Collections(java.util.Collections) Resources(org.bf2.cos.fleetshard.support.resources.Resources) KafkaConnectorSpecBuilder(io.strimzi.api.kafka.model.KafkaConnectorSpecBuilder) DebeziumOperandSupport.createConfig(org.bf2.cos.fleetshard.operator.debezium.DebeziumOperandSupport.createConfig) KafkaConnector(io.strimzi.api.kafka.model.KafkaConnector) KafkaConnect(io.strimzi.api.kafka.model.KafkaConnect) DebeziumOperandSupport.lookupKafkaConnect(org.bf2.cos.fleetshard.operator.debezium.DebeziumOperandSupport.lookupKafkaConnect)

Example 54 with KafkaConnector

use of io.strimzi.api.kafka.model.KafkaConnector in project cos-fleetshard by bf2fc6cc711aee1a0c2a.

the class KafkaConnectorSteps method kc_config_contains.

@And("the kctr has config containing:")
public void kc_config_contains(DataTable table) {
    KafkaConnector res = kctr();
    assertThat(res).isNotNull();
    assertThatDataTable(table, ctx::resolvePlaceholders).matches(res.getSpec().getConfig());
}
Also used : KafkaConnector(io.strimzi.api.kafka.model.KafkaConnector) And(io.cucumber.java.en.And)

Example 55 with KafkaConnector

use of io.strimzi.api.kafka.model.KafkaConnector in project strimzi-kafka-operator by strimzi.

the class ConnectorMockTest method testConnectorResourceMetrics.

@Test
void testConnectorResourceMetrics(VertxTestContext context) {
    String connectName1 = "cluster1";
    String connectName2 = "cluster2";
    String connectorName1 = "connector1";
    String connectorName2 = "connector2";
    KafkaConnect kafkaConnect1 = new KafkaConnectBuilder().withNewMetadata().withNamespace(NAMESPACE).withName(connectName1).addToAnnotations(Annotations.STRIMZI_IO_USE_CONNECTOR_RESOURCES, "true").endMetadata().withNewSpec().withReplicas(1).endSpec().build();
    KafkaConnect kafkaConnect2 = new KafkaConnectBuilder(kafkaConnect1).editMetadata().withName(connectName2).endMetadata().build();
    Crds.kafkaConnectOperation(client).inNamespace(NAMESPACE).create(kafkaConnect1);
    Crds.kafkaConnectOperation(client).inNamespace(NAMESPACE).create(kafkaConnect2);
    waitForConnectReady(connectName1);
    waitForConnectReady(connectName2);
    KafkaConnector connector1 = defaultKafkaConnectorBuilder().editMetadata().withName(connectorName1).addToLabels(Labels.STRIMZI_CLUSTER_LABEL, connectName1).addToAnnotations(Annotations.ANNO_STRIMZI_IO_PAUSE_RECONCILIATION, "true").endMetadata().build();
    KafkaConnector connector2 = defaultKafkaConnectorBuilder().editMetadata().withName(connectorName2).addToLabels(Labels.STRIMZI_CLUSTER_LABEL, connectName2).addToAnnotations(Annotations.ANNO_STRIMZI_IO_PAUSE_RECONCILIATION, "true").endMetadata().build();
    Crds.kafkaConnectorOperation(client).inNamespace(NAMESPACE).create(connector1);
    Crds.kafkaConnectorOperation(client).inNamespace(NAMESPACE).create(connector2);
    waitForConnectorPaused(connectorName1);
    waitForConnectorPaused(connectorName2);
    MeterRegistry meterRegistry = metricsProvider.meterRegistry();
    Tags tags = Tags.of("kind", KafkaConnector.RESOURCE_KIND, "namespace", NAMESPACE);
    Promise<Void> reconciled1 = Promise.promise();
    Promise<Void> reconciled2 = Promise.promise();
    kafkaConnectOperator.reconcileAll("test", NAMESPACE, ignored -> reconciled1.complete());
    Checkpoint async = context.checkpoint();
    reconciled1.future().onComplete(context.succeeding(v -> context.verify(() -> {
        Gauge resources = meterRegistry.get("strimzi.resources").tags(tags).gauge();
        assertThat(resources.value(), is(2.0));
        Gauge resourcesPaused = meterRegistry.get("strimzi.resources.paused").tags(tags).gauge();
        assertThat(resourcesPaused.value(), is(2.0));
        Crds.kafkaConnectorOperation(client).inNamespace(NAMESPACE).delete(connector1);
        waitForConnectorDeleted(connectorName1);
        kafkaConnectOperator.reconcileAll("test", NAMESPACE, ignored -> reconciled2.complete());
        reconciled2.future().onComplete(context.succeeding(v1 -> context.verify(() -> {
            assertThat(resources.value(), is(1.0));
            assertThat(resourcesPaused.value(), is(1.0));
            async.flag();
        })));
    })));
}
Also used : CoreMatchers.is(org.hamcrest.CoreMatchers.is) BeforeEach(org.junit.jupiter.api.BeforeEach) ConnectorPluginBuilder(io.strimzi.api.kafka.model.connect.ConnectorPluginBuilder) OrderedProperties(io.strimzi.operator.common.model.OrderedProperties) LabelSelector(io.fabric8.kubernetes.api.model.LabelSelector) TestUtils.waitFor(io.strimzi.test.TestUtils.waitFor) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Annotations(io.strimzi.operator.common.Annotations) TimeoutException(java.util.concurrent.TimeoutException) Disabled(org.junit.jupiter.api.Disabled) KafkaConnector(io.strimzi.api.kafka.model.KafkaConnector) 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) EnableKubernetesMockClient(io.fabric8.kubernetes.client.server.mock.EnableKubernetesMockClient) Map(java.util.Map) ResourceOperatorSupplier(io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier) JsonObject(io.vertx.core.json.JsonObject) ResourceUtils(io.strimzi.operator.cluster.ResourceUtils) MockKube2(io.strimzi.test.mockkube2.MockKube2) Tags(io.micrometer.core.instrument.Tags) KafkaConnect(io.strimzi.api.kafka.model.KafkaConnect) Gauge(io.micrometer.core.instrument.Gauge) ConnectTimeoutException(io.netty.channel.ConnectTimeoutException) Predicate(java.util.function.Predicate) MetricsProvider(io.strimzi.operator.common.MetricsProvider) 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) Optional(java.util.Optional) Checkpoint(io.vertx.junit5.Checkpoint) Condition(io.strimzi.api.kafka.model.status.Condition) 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) Watch(io.fabric8.kubernetes.client.Watch) HashMap(java.util.HashMap) Crds(io.strimzi.api.kafka.Crds) Mockito.spy(org.mockito.Mockito.spy) 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) Promise(io.vertx.core.Promise) 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) MeterRegistry(io.micrometer.core.instrument.MeterRegistry) 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) KafkaConnectBuilder(io.strimzi.api.kafka.model.KafkaConnectBuilder) Checkpoint(io.vertx.junit5.Checkpoint) KafkaConnector(io.strimzi.api.kafka.model.KafkaConnector) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) KafkaConnect(io.strimzi.api.kafka.model.KafkaConnect) Tags(io.micrometer.core.instrument.Tags) MeterRegistry(io.micrometer.core.instrument.MeterRegistry) Gauge(io.micrometer.core.instrument.Gauge) Test(org.junit.jupiter.api.Test)

Aggregations

KafkaConnector (io.strimzi.api.kafka.model.KafkaConnector)125 Test (org.junit.jupiter.api.Test)92 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)92 KafkaConnect (io.strimzi.api.kafka.model.KafkaConnect)91 KafkaConnectBuilder (io.strimzi.api.kafka.model.KafkaConnectBuilder)77 KubernetesClient (io.fabric8.kubernetes.client.KubernetesClient)69 PlatformFeaturesAvailability (io.strimzi.operator.PlatformFeaturesAvailability)68 ResourceOperatorSupplier (io.strimzi.operator.cluster.operator.resource.ResourceOperatorSupplier)68 Reconciliation (io.strimzi.operator.common.Reconciliation)68 Vertx (io.vertx.core.Vertx)68 List (java.util.List)68 KafkaConnectResources (io.strimzi.api.kafka.model.KafkaConnectResources)66 KafkaConnectCluster (io.strimzi.operator.cluster.model.KafkaConnectCluster)66 Annotations (io.strimzi.operator.common.Annotations)66 Future (io.vertx.core.Future)66 Optional (java.util.Optional)66 KubernetesVersion (io.strimzi.operator.KubernetesVersion)64 KafkaVersionTestUtils (io.strimzi.operator.cluster.KafkaVersionTestUtils)64 Checkpoint (io.vertx.junit5.Checkpoint)64 VertxExtension (io.vertx.junit5.VertxExtension)64