Skip to content

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

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

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

@mmatczuk
Copy link
Copy Markdown
Contributor Author

Superseded by waterfall-grouped package PRs (see #4296-#4314).

@mmatczuk mmatczuk closed this Apr 20, 2026
@mmatczuk mmatczuk deleted the mmt/mssqlserver-fix-flaky-cdc-streaming-tests-under-x86-emulation branch April 20, 2026 13:28
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