Skip to content

Conversation

@ivanauth
Copy link
Contributor

@ivanauth ivanauth commented Dec 9, 2025

Summary

Rewrites the CRDB pool retry tests to use Go's testing/synctest package for better time simulation and test reliability.

Fixes #2713

Changes

  • Wrap all retry tests in synctest.Test(t, func(t *testing.T) { ... })
  • Use t.Context() instead of context.Background()
  • Add t.Parallel() for concurrent test execution

Benefits

  • Tests no longer rely on real time delays
  • More deterministic test execution
  • Faster test runs with simulated time
  • Better parallel execution support

@ivanauth ivanauth requested a review from a team as a code owner December 9, 2025 01:09
@github-actions github-actions bot added area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels Dec 9, 2025
@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.73%. Comparing base (ae83447) to head (e65d882).
⚠️ Report is 43 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2754      +/-   ##
==========================================
+ Coverage   77.03%   77.73%   +0.70%     
==========================================
  Files         466      473       +7     
  Lines       49199    49906     +707     
==========================================
+ Hits        37896    38787     +891     
+ Misses       8514     8255     -259     
- Partials     2789     2864      +75     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ivanauth ivanauth force-pushed the fix/issue-2713-crdb-retry-tests-synctest branch from 1712d3c to 483cf87 Compare December 13, 2025 02:08
@ivanauth ivanauth force-pushed the fix/issue-2713-crdb-retry-tests-synctest branch from 483cf87 to e65d882 Compare January 8, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite CRDB pool retry tests to use synctest

1 participant