Class AbstractCloudEventsConverterTest<T extends org.apache.kafka.connect.source.SourceConnector>

All Implemented Interfaces:
Testing

public abstract class AbstractCloudEventsConverterTest<T extends org.apache.kafka.connect.source.SourceConnector> extends AbstractAsyncEngineConnectorTest
A unified test of all CloudEventsConverter behavior which all connectors should extend.
Author:
Roman Kudryashov
  • Constructor Details

    • AbstractCloudEventsConverterTest

      public AbstractCloudEventsConverterTest()
  • Method Details

    • getConnectorClass

      protected abstract Class<T> getConnectorClass()
    • getConnectorName

      protected abstract String getConnectorName()
    • getServerName

      protected abstract String getServerName()
    • databaseConnection

      protected abstract JdbcConnection databaseConnection()
    • getConfigurationBuilder

      protected abstract Configuration.Builder getConfigurationBuilder()
    • topicName

      protected abstract String topicName()
    • topicNameOutbox

      protected abstract String topicNameOutbox()
    • createTable

      protected abstract void createTable() throws Exception
      Throws:
      Exception
    • createOutboxTable

      protected abstract void createOutboxTable() throws Exception
      Throws:
      Exception
    • createInsert

      protected abstract String createInsert()
    • createInsertToOutbox

      protected abstract String createInsertToOutbox(String eventId, String eventType, String aggregateType, String aggregateId, String payloadJson, String additional)
    • waitForStreamingStarted

      protected abstract void waitForStreamingStarted() throws InterruptedException
      Throws:
      InterruptedException
    • beforeEach

      public void beforeEach() throws Exception
      Throws:
      Exception
    • afterEach

      public void afterEach() throws Exception
      Throws:
      Exception
    • shouldConvertToCloudEventsInJsonWithoutExtensionAttributes

      @FixFor("DBZ-6982") public void shouldConvertToCloudEventsInJsonWithoutExtensionAttributes() throws Exception
      Throws:
      Exception
    • shouldConvertToCloudEventsInJsonWithMetadataAndIdAndTypeInHeadersAfterOutboxEventRouter

      @FixFor({"DBZ-3642","DBZ-7016"}) public void shouldConvertToCloudEventsInJsonWithMetadataAndIdAndTypeInHeadersAfterOutboxEventRouter() throws Exception
      Throws:
      Exception
    • shouldConvertToCloudEventsInJsonWithDataAsAvroAndAllMetadataInHeadersAfterOutboxEventRouter

      @FixFor("DBZ-7284") public void shouldConvertToCloudEventsInJsonWithDataAsAvroAndAllMetadataInHeadersAfterOutboxEventRouter() throws Exception
      Throws:
      Exception
    • shouldConvertToCloudEventsInJsonWithIdFromHeaderAndGeneratedType

      @FixFor("DBZ-7016") public void shouldConvertToCloudEventsInJsonWithIdFromHeaderAndGeneratedType() throws Exception
      Throws:
      Exception
    • shouldThrowExceptionWhenDeserializingNotCloudEventJson

      @FixFor("DBZ-7159") public void shouldThrowExceptionWhenDeserializingNotCloudEventJson() throws Exception
      Throws:
      Exception
    • shouldThrowExceptionWhenDeserializingNotCloudEventAvro

      @FixFor("DBZ-7159") public void shouldThrowExceptionWhenDeserializingNotCloudEventAvro() throws Exception
      Throws:
      Exception
    • shouldConvertToCloudEventsInAvroWithCustomCloudEventsSchemaName

      @FixFor("DBZ-7235") public void shouldConvertToCloudEventsInAvroWithCustomCloudEventsSchemaName() throws Exception
      Throws:
      Exception
    • startConnector

      private void startConnector() throws Exception
      Throws:
      Exception