Skip to content

Commit b6a7d60

Browse files
committed
tapchannel: adjust timing for quit and cancel test
Testing aux signer quit behavior involved building a job queue and then checking that some portion of the jobs were skipped, and that the last job was not processed. This led to racy behavior if the job queue was too short, or the delay after sending a signal was too long. Using a larger queue and shorter delay reduces the odds of a race here.
1 parent 7ebb640 commit b6a7d60

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tapchannel/auf_leaf_signer_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var (
4949
}
5050

5151
// sig job batch size when making more that one sig job.
52-
numSigJobs = int32(10)
52+
numSigJobs = int32(25)
5353

5454
// Threshold for trying to cancel or quit the aux leaf signer (allow
5555
// the signer to complete a third of the batch).
@@ -207,7 +207,6 @@ func TestAuxLeafSignerCancelAndQuit(t *testing.T) {
207207
// Another component could have sent the cancel signal; we'll
208208
// send that before the quit signal.
209209
close(cancelChan)
210-
time.Sleep(time.Millisecond)
211210

212211
// Send the quit signal; jobs at the end of the batch should not
213212
// be processed.

0 commit comments

Comments
 (0)