Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-7502

Minimize Test Suite calls to TestHelper.enableSchemaTableCdc

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Major
    • Backlog
    • None
    • sqlserver-connector
    • None
    • False
    • None
    • False

    Description

      As our SQL Server test suite has continued to grow, the duration of the test execution for the connector has grown substantially, currently being one of the longest-running test suites across our entire project. In the long term, this isn't sustainable.

      Looking at the time spent per stage in a standard SQL Server test, there are approximately 5-8 seconds consumed when executing the following SQL:

          private static final String ENABLE_TABLE_CDC = "IF EXISTS(select 1 from sys.tables where name = '#' AND is_tracked_by_cdc=0)\n"
                  + "EXEC sys.sp_cdc_enable_table @source_schema = N'%', @source_name = N'#', @role_name = NULL, @supports_net_changes = 0";
      

      If this happens within a beforeEach or within each annotated test method, this can add up to substantial time wasted.

      I'd propose to see whether we can find a solution to either reduce the time consumed by the sp_cdc_enable_table stored procedure or we re-evaluate the layout of our tests to minimize the number of times this function is called.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ccranfor@redhat.com Chris Cranford
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: