Class IncrementalSnapshotCollationSortOrderMismatchIT

java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.embedded.async.AbstractAsyncEngineConnectorTest
io.debezium.pipeline.source.snapshot.incremental.AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
io.debezium.connector.sqlserver.IncrementalSnapshotCollationSortOrderMismatchIT
All Implemented Interfaces:
Testing

public class IncrementalSnapshotCollationSortOrderMismatchIT extends AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
Tests for DBZ-7359
  • Field Details

    • POLLING_INTERVAL

      private static final int POLLING_INTERVAL
      See Also:
    • SQL_COLLATION

      private static final String SQL_COLLATION
      See Also:
    • ALL_IDS

      private static final List<String> ALL_IDS
    • SKIPPED_IDS

      private static final List<String> SKIPPED_IDS
    • connection

      private io.debezium.connector.sqlserver.SqlServerConnection connection
    • isSendStringParametersAsUnicode

      private boolean isSendStringParametersAsUnicode
  • Constructor Details

    • IncrementalSnapshotCollationSortOrderMismatchIT

      public IncrementalSnapshotCollationSortOrderMismatchIT()
  • Method Details

    • beforeClass

      public static void beforeClass() throws IOException
      Throws:
      IOException
    • orderMismatchPkCharValueIntParamsAsUnicodeFalse

      public void orderMismatchPkCharValueIntParamsAsUnicodeFalse() throws Exception
      Throws:
      Exception
    • orderMismatchPkCharValueIntParamsAsUnicodeTrueSkip36

      public void orderMismatchPkCharValueIntParamsAsUnicodeTrueSkip36() throws Exception
      Throws:
      Exception
    • orderMismatchPkVarcharValueIntParamsAsUnicodeFalse

      public void orderMismatchPkVarcharValueIntParamsAsUnicodeFalse() throws Exception
      Throws:
      Exception
    • orderMismatchPkVarcharValueIntParamsAsUnicodeTrueSkip36

      public void orderMismatchPkVarcharValueIntParamsAsUnicodeTrueSkip36() throws Exception
      Throws:
      Exception
    • orderMismatchPkVarcharValueNvarcharParamsAsUnicodeFalse

      public void orderMismatchPkVarcharValueNvarcharParamsAsUnicodeFalse() throws Exception
      Throws:
      Exception
    • orderMismatchPkVarcharValueNvarcharParamsAsUnicodeTrueSkip36

      public void orderMismatchPkVarcharValueNvarcharParamsAsUnicodeTrueSkip36() throws Exception
      Throws:
      Exception
    • orderMismatchPkNcharValueNvarcharParamsAsUnicodeFalse

      public void orderMismatchPkNcharValueNvarcharParamsAsUnicodeFalse() throws Exception
      Throws:
      Exception
    • orderMismatchPkNcharValueNvarcharParamsAsUnicodeTrue

      public void orderMismatchPkNcharValueNvarcharParamsAsUnicodeTrue() throws Exception
      Throws:
      Exception
    • orderMismatchPkNvarcharValueNvarcharParamsAsUnicodeFalse

      public void orderMismatchPkNvarcharValueNvarcharParamsAsUnicodeFalse() throws Exception
      Throws:
      Exception
    • orderMismatchPkNvarcharValueNvarcharParamsAsUnicodeTrue

      public void orderMismatchPkNvarcharValueNvarcharParamsAsUnicodeTrue() throws Exception
      Throws:
      Exception
    • orderMismatchPkTypecharValueInt

      protected void orderMismatchPkTypecharValueInt(boolean isSendStringParametersAsUnicode, int expectedRecordCount, String pkDataType) throws Exception
      Throws:
      Exception
    • orderMismatchPkVarcharValueNvarchar

      protected void orderMismatchPkVarcharValueNvarchar(boolean isSendStringParametersAsUnicode, int expectedRecordCount) throws Exception
      Throws:
      Exception
    • orderMismatchPkNtypeValueNvarchar

      protected void orderMismatchPkNtypeValueNvarchar(boolean isSendStringParametersAsUnicode, int expectedRecordCount, String pkDataType) throws Exception
      Throws:
      Exception
    • runTest

      protected <P, V> void runTest(boolean isSendStringParametersAsUnicode, int expectedRecordCount, String pkDataType, BiFunction<String,Integer,String> pkInsValFn, Function<org.apache.kafka.connect.data.Struct,P> pkConverter, String valueDataType, BiFunction<String,Integer,String> valueInsValFn, Function<org.apache.kafka.connect.source.SourceRecord,V> valueConverter, Predicate<Map<P,V>> validateDbChanges) throws Exception
      Throws:
      Exception
    • populateTable

      protected void populateTable(io.debezium.connector.sqlserver.SqlServerConnection connection, BiFunction<String,Integer,String> pkInsValFn, BiFunction<String,Integer,String> valueInsValFn) throws SQLException
      Throws:
      SQLException
    • testIncrementalSnapshotConsumed

      protected <P, V> void testIncrementalSnapshotConsumed(int expectedRecordCount, Function<org.apache.kafka.connect.data.Struct,P> pkConverter, Function<org.apache.kafka.connect.source.SourceRecord,V> valueConverter, Predicate<Map<P,V>> validateDbChanges) throws InterruptedException
      Throws:
      InterruptedException
    • consumeIncrementalSnapshot

      protected <P, V> Map<P,V> consumeIncrementalSnapshot(int recordCount, Predicate<Map.Entry<P,V>> dataCompleted, Function<org.apache.kafka.connect.data.Struct,P> pkConverter, Function<org.apache.kafka.connect.source.SourceRecord,V> valueConverter, String topicName, Consumer<List<org.apache.kafka.connect.source.SourceRecord>> recordConsumer, boolean assertRecords) throws InterruptedException
      Throws:
      InterruptedException
    • connectorClass

      protected Class<io.debezium.connector.sqlserver.SqlServerConnector> connectorClass()
      Specified by:
      connectorClass in class AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
    • databaseConnection

      protected JdbcConnection databaseConnection()
      Specified by:
      databaseConnection in class AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
    • topicName

      protected String topicName()
      Specified by:
      topicName in class AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
    • tableName

      protected String tableName()
      Specified by:
      tableName in class AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
    • topicNames

      protected List<String> topicNames()
      Specified by:
      topicNames in class AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
    • tableNames

      protected List<String> tableNames()
      Specified by:
      tableNames in class AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
    • signalTableName

      protected String signalTableName()
      Specified by:
      signalTableName in class AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
    • config

      protected Configuration.Builder config()
      Specified by:
      config in class AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
    • mutableConfig

      protected Configuration.Builder mutableConfig(boolean signalTableOnly, boolean storeOnlyCapturedDdl)
      Specified by:
      mutableConfig in class AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
    • connector

      protected String connector()
      Specified by:
      connector in class AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>
    • server

      protected String server()
      Specified by:
      server in class AbstractSnapshotTest<io.debezium.connector.sqlserver.SqlServerConnector>