Package io.strimzi.systemtest.utils.kafkaUtils

## Class KafkaConnectUtils

- java.lang.Object
- - io.strimzi.systemtest.utils.kafkaUtils.KafkaConnectUtils

-     public class KafkaConnectUtils
      extends Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `sendReceiveMessagesThroughConnect​(String connectPodName, String topicName, String kafkaClientsPodName, String namespace, String clusterName)` | Send and receive messages through file sink connector (using Kafka Connect).
    `static void` | `waitForConnectNotReady​(String clusterName)` |
    `static void` | `waitForConnectReady​(String clusterName)` |
    `static void` | `waitForConnectStatus​(String clusterName, Enum<?> status)` | Wait until the given Kafka Connect is in desired state.
    `static void` | `waitForKafkaConnectCondition​(String conditionReason, String conditionType, String namespace, String clusterName)` | Wait for designated Kafka Connect resource condition type and reason to happen.
    `static void` | `waitForKafkaConnectConfigChange​(String propertyKey, String propertyValue, String namespace, String clusterName)` | Waits until the kafka connect CR config has changed.
    `static void` | `waitForMessagesInKafkaConnectFileSink​(String kafkaConnectPodName, String sinkFileName)` |
    `static void` | `waitForMessagesInKafkaConnectFileSink​(String kafkaConnectPodName, String sinkFileName, String message)` |
    `static void` | `waitUntilKafkaConnectRestApiIsAvailable​(String podNamePrefix)` |
    `static void` | `waitUntilKafkaConnectStatusConditionContainsMessage​(String clusterName, String namespace, String message)` |

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### waitForConnectStatus

          public static void waitForConnectStatus​(String clusterName,
                                                  Enum<?> status)

      Wait until the given Kafka Connect is in desired state.
      Parameters:
        `clusterName` - name of KafkaConnect cluster
        `status` - desired state

    - #### waitForConnectReady

          public static void waitForConnectReady​(String clusterName)

    - #### waitForConnectNotReady

          public static void waitForConnectNotReady​(String clusterName)

    - #### waitUntilKafkaConnectRestApiIsAvailable

          public static void waitUntilKafkaConnectRestApiIsAvailable​(String podNamePrefix)

    - #### waitForMessagesInKafkaConnectFileSink

          public static void waitForMessagesInKafkaConnectFileSink​(String kafkaConnectPodName,
                                                                   String sinkFileName,
                                                                   String message)

    - #### waitForMessagesInKafkaConnectFileSink

          public static void waitForMessagesInKafkaConnectFileSink​(String kafkaConnectPodName,
                                                                   String sinkFileName)

    - #### waitForKafkaConnectConfigChange

          public static void waitForKafkaConnectConfigChange​(String propertyKey,
                                                             String propertyValue,
                                                             String namespace,
                                                             String clusterName)

      Waits until the kafka connect CR config has changed.
      Parameters:
        `propertyKey` - property key in the Kafka Connect CR config
        `propertyValue` - property value in the Kafka Connect CR config
        `namespace` - namespace name
        `clusterName` - cluster name

    - #### waitForKafkaConnectCondition

          public static void waitForKafkaConnectCondition​(String conditionReason,
                                                          String conditionType,
                                                          String namespace,
                                                          String clusterName)

      Wait for designated Kafka Connect resource condition type and reason to happen.
      Parameters:
        `conditionReason` - String regexp of condition reason
        `conditionType` - String regexp of condition type
        `namespace` - namespace name
        `clusterName` - cluster name

    - #### waitUntilKafkaConnectStatusConditionContainsMessage

          public static void waitUntilKafkaConnectStatusConditionContainsMessage​(String clusterName,
                                                                                 String namespace,
                                                                                 String message)

    - #### sendReceiveMessagesThroughConnect

          public static void sendReceiveMessagesThroughConnect​(String connectPodName,
                                                               String topicName,
                                                               String kafkaClientsPodName,
                                                               String namespace,
                                                               String clusterName)

      Send and receive messages through file sink connector (using Kafka Connect).
      Parameters:
        `connectPodName` - kafkaConnect pod name
        `topicName` - topic to be used
        `kafkaClientsPodName` - kafkaClients pod name
        `namespace` - namespace name
        `clusterName` - cluster name