Class SQLServerNumericColumnIT

java.lang.Object
io.debezium.embedded.AbstractConnectorTest
io.debezium.connector.sqlserver.SQLServerNumericColumnIT
All Implemented Interfaces:
Testing

public class SQLServerNumericColumnIT extends AbstractConnectorTest
Tests for numeric/decimal columsn with precise, string and decimal options
Author:
Pradeep Mamillapalli
  • Field Details

    • connection

      private io.debezium.connector.sqlserver.SqlServerConnection connection
  • Constructor Details

    • SQLServerNumericColumnIT

      public SQLServerNumericColumnIT()
  • Method Details

    • before

      public void before() throws SQLException
      Create 2 Tables. Each table has 4 columns cola: Decimal(8,4) type with 8 precision and 4 scale colb: Decimal - Default precision(18) and default scale(0) colc: numeric(7,1) - 7 precision and 1 scale cold: numeric- Default precision(18) and default scale(0)
      Throws:
      SQLException
    • after

      public void after() throws SQLException
      Throws:
      SQLException
    • decimalModeConfigString

      public void decimalModeConfigString() throws Exception
      Insert 1 Record into tablenuma with DecimalHandlingMode.STRING mode Assertions: - Connector is running - 1 Record are streamed out of cdc - Assert cola, colb, colc, cold are exactly equal to the input values.
      Throws:
      Exception
    • decimalModeConfigDouble

      public void decimalModeConfigDouble() throws Exception
      Insert 1 Record into tablenumb with DecimalHandlingMode.DOUBLE mode Assertions: - Connector is running - 1 Record are streamed out of cdc - Assert cola, colb, colc, cold are exactly equal to the input values in double format
      Throws:
      Exception
    • decimalModeConfigPrecise

      public void decimalModeConfigPrecise() throws Exception
      Insert 1 Record into tablenumc with DecimalHandlingMode.PRECISE mode Assertions: - Connector is running - 1 Record are streamed out of cdc - Assert cola, colb, colc, cold are bytes
      Throws:
      Exception
    • assertSchema

      private void assertSchema(org.apache.kafka.connect.data.Struct valueA, org.apache.kafka.connect.data.Schema expected)