Give the remaining fixed Task.Delay waits in tests a stated clock or a condition wait #214

Closed
opened 2026-10-27 01:39:40 -05:00 by ethan-hann · 1 comment
Owner

.agents/coding-standards/tests-naming-and-structure.md says a test waits on a condition with a deadline and keeps a fixed delay only with a comment that names an outside clock. About 30 Task.Delay(<milliseconds>, ...) waits in tests have neither: 1100 ms waits for git's whole-second file times (for example AmendTests, RemovedSnapshotRecordTests, BranchCopyTests), which need only a comment, and 150 to 750 ms absence waits (for example StorageGateTests, CaptureQueuedTests, ReclaimInterruptedTests), which should wait on a condition or say why a fixed absence window is right. Find them with grep -rn --include=*.cs "Task.Delay(" tests, and widen the standard's verification grep to match.

`.agents/coding-standards/tests-naming-and-structure.md` says a test waits on a condition with a deadline and keeps a fixed delay only with a comment that names an outside clock. About 30 `Task.Delay(<milliseconds>, ...)` waits in tests have neither: 1100 ms waits for git's whole-second file times (for example AmendTests, RemovedSnapshotRecordTests, BranchCopyTests), which need only a comment, and 150 to 750 ms absence waits (for example StorageGateTests, CaptureQueuedTests, ReclaimInterruptedTests), which should wait on a condition or say why a fixed absence window is right. Find them with `grep -rn --include=*.cs "Task.Delay(" tests`, and widen the standard's verification grep to match.
ethan-hann added this to the Code Cleanup milestone 2026-10-27 01:39:40 -05:00
Author
Owner

Shipped in 0.9.17 (PR 227).

Shipped in [0.9.17](https://git.tortal.tech/ethan-hann/SavePoint/releases/tag/v0.9.17) (PR 227).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ethan-hann/SavePoint#214
No description provided.