Fix flaky test: AdapterTest.FillShouldAllowRetryLogicProviderToBeInvoked
- Dominant language
- C#
- Stars
- 989
- Forks
- 340
- Avg merge
- 4d 19h
- Merged PRs (30d)
- 72
Description
### Description
The test `AdapterTest.FillShouldAllowRetryLogicProviderToBeInvoked` is intermittently failing in CI pipelines and has been marked as flaky with `[Trait("Category", "flaky")]`.
### Root Cause
The test uses a 1-second `ConnectTimeout` and 1-second `CommandTimeout` with a `WAITFOR DELAY '00:00:02'` query to force timeout retries. This timing-sensitive approach is inherently fragile in CI environments where resource contention can cause variable execution times.
### File
`src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/AdapterTest/AdapterTest.cs`
### Action Needed
- Investigate the root cause of the intermittent failure
- Make the test reliable (e.g. increase timeouts or use a different mechanism to trigger retries)
- Remove the `[Trait("Category", "flaky")]` attribute once stabilized
Contributor guide
Assessment
This issue has not been assessed yet.