Skip to content

mssqlserver: fix flaky CDC streaming tests under x86 emulation#4277

Open
mmatczuk wants to merge 1 commit intomainfrom
mmt/mssqlserver-fix-flaky-cdc-streaming-tests-under-x86-emulation
Open

mssqlserver: fix flaky CDC streaming tests under x86 emulation#4277
mmatczuk wants to merge 1 commit intomainfrom
mmt/mssqlserver-fix-flaky-cdc-streaming-tests-under-x86-emulation

Conversation

@mmatczuk
Copy link
Copy Markdown
Contributor

The CDC capture agent in SQL Server under x86 emulation on Apple Silicon
is too slow to process streaming inserts within the test timeout,
especially with 3 parallel subtests each spinning up their own container.

  • Add WaitForCDCChanges helper that polls CDC change tables until the
    expected row count appears, replacing fixed time.Sleep(5s)
  • Reduce streaming insert count from 3000 to 30 (snapshot already
    validates volume at 3000 rows)
  • Wait for CDC to process streaming inserts before asserting

Fixes CON-414

The CDC capture agent in SQL Server under x86 emulation on Apple Silicon
is too slow to process streaming inserts within the test timeout,
especially with 3 parallel subtests each spinning up their own container.

- Add WaitForCDCChanges helper that polls CDC change tables until the
  expected row count appears, replacing fixed time.Sleep(5s)
- Reduce streaming insert count from 3000 to 30 (snapshot already
  validates volume at 3000 rows)
- Wait for CDC to process streaming inserts before asserting

Fixes CON-414
@claude
Copy link
Copy Markdown

claude bot commented Apr 16, 2026

Commits
LGTM

Review
Replaces brittle time.Sleep with a polling-based WaitForCDCChanges helper and reduces streaming insert volume to prevent timeouts under x86 emulation. Changes are well-scoped and follow project test patterns.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant