Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2650c263b |
+6
-6
@@ -706,12 +706,12 @@ func TestFeedHashJobsClosesJobsWhenCancelled(t *testing.T) {
|
||||
// hashWorker's other cancellation exit, abandoning the send of a
|
||||
// result, is reachable from the scan: stop cancels the pool before it
|
||||
// drains results, so a worker waiting on that send can leave through
|
||||
// it. TestScanHashWriteFailureUnwindsPool reaches it in some runs only,
|
||||
// depending on whether the workers have filled the results channel when
|
||||
// stop runs, and no test fails without it, since stop's drain frees a
|
||||
// waiting worker anyway. This test, for its part, catches a removed
|
||||
// drop check in some runs only: a worker that hashes the run anyway
|
||||
// then picks at random between sending the result and leaving.
|
||||
// it. The tests that stop a scan mid-hash, among them
|
||||
// TestScanHashWriteFailureUnwindsPool, reach it in some runs only,
|
||||
// depending on timing, and no test fails without it, since stop's
|
||||
// drain frees a waiting worker anyway. This test, for its part, catches
|
||||
// a removed drop check in some runs only: a worker that hashes the run
|
||||
// anyway then picks at random between sending the result and leaving.
|
||||
func TestHashWorkerDropsQueuedRuns(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user