Files
ngit-grasp/tests/sync
DanConwayDevandClaude Fable 5.1 e3afc28fc3 test(metrics): bracket sync activity with observable scrapes
The availability test scraped the metrics endpoint three times with a
200 ms timer between requests to sample "during sync". The timer did not
relate the samples to any sync state, so under load all three could
land before the sync connection existed.

Scrape once while the connection to the source is still being
established, wait for the connection gauge to report it through the
existing `wait_for_sync_connection` helper, and scrape again. The two
samples now bracket the connection instead of being spaced by a timer.
The remaining sleeps in this file are the intervals of bounded polls.

Validation: measured against master with the same binaries, 20 unloaded
runs and 30 samples as three concurrent instances under CPU spinners;
see the pull request description.

Assisted-by: Claude Fable 5.1
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-18 14:33:10 +00:00
..