Skip to content

test: deflake flush-loop and retry tests#63

Merged
Theauxm merged 1 commit intomainfrom
test/deflake-flush-and-retry-tests
May 6, 2026
Merged

test: deflake flush-loop and retry tests#63
Theauxm merged 1 commit intomainfrom
test/deflake-flush-and-retry-tests

Conversation

@Theauxm
Copy link
Copy Markdown
Member

@Theauxm Theauxm commented May 6, 2026

Summary

Two pre-existing tests had fixed-duration sleeps standing in for synchronisation:

  • ConnectionFailure_RetriesInsteadOfCrashing previously slept 7s hoping the 5s retry delay had fired by then. Now polls for callCount > 1 with a 15s ceiling, so the test reflects the service's real retry timing rather than racing GitHub Actions scheduling overhead.
  • FlushLoop_BatchesLogsToDatabase previously slept 1.5s past the 1-second flush timer. Now polls the database for the first persisted log with a 15s ceiling. Local run drops from 1.5s+ to ~600ms.

Both timeouts are safety ceilings, not sleeps. Each test finishes as soon as the underlying signal appears.

Test plan

  • dotnet build — zero warnings (one pre-existing CS8602 in JsonEffectProviderTests unrelated to this change)
  • dotnet csharpier check . — clean
  • Both target tests pass locally

ConnectionFailure_RetriesInsteadOfCrashing previously slept a fixed
7 seconds hoping the 5-second retry delay had fired by then. Polls
for callCount > 1 with a 15-second ceiling so the test reflects the
service's real retry timing rather than racing GitHub Actions
scheduling overhead.

FlushLoop_BatchesLogsToDatabase previously slept 1.5s past the
1-second flush timer. Polls the database for the first persisted
log with a 15-second ceiling. Local run drops from 1.5s+ to
roughly 600ms.
@Theauxm Theauxm merged commit e8dc6ec into main May 6, 2026
1 check passed
@Theauxm Theauxm deleted the test/deflake-flush-and-retry-tests branch May 6, 2026 01:05
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@traxsharp
Copy link
Copy Markdown

traxsharp Bot commented May 8, 2026

This PR is included in version 1.34.0

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