Test both hashWorker cancellation checks on their own (closes #83)
check / check (push) Failing after 2s

TestHashWorkerDropsQueuedRuns now passes hashWorker a hash function
that records being called, so a worker that hashes a run after the
scan is cancelled fails the test every time instead of only when it
then chose to send its result.

TestHashWorkerAbandonsBlockedSend cancels the scan from inside the
hash function and leaves the result channel unread, so the worker can
only return through the cancellation case beside its send. The scan
tests could not show this, because stop drains results and frees a
parked worker anyway.

Model: opus-5-5
This commit is contained in:
2026-10-04 13:47:53 +00:00
parent 722675f153
commit 712a82e08b
2 changed files with 55 additions and 22 deletions
+3
View File
@@ -29,6 +29,9 @@
# Completed Steps
- a test fails when either `hashWorker` cancellation check in `scan.go`
is removed (2026-10-04, https://git.eeqj.de/sneak/sfdupes/issues/83)
- a database path holding `?`, `#` or `%` opens exactly the file it names
(2026-10-04, https://git.eeqj.de/sneak/sfdupes/issues/55)