test(uploads): the worker waits for its heartbeat to finish -- a mutation that skipped the wait survived until now
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -131,6 +131,7 @@ func TestWorkerProgress_AShutdownIsNotRecordedAsAFailedStep(t *testing.T) {
|
|||||||
func TestWorkerProgress_TheHeartbeatBeatsWhileAnEngineCallIsStuckAndStopsWhenTheJobEnds(t *testing.T) {
|
func TestWorkerProgress_TheHeartbeatBeatsWhileAnEngineCallIsStuckAndStopsWhenTheJobEnds(t *testing.T) {
|
||||||
r := newWRig(t, time.Minute)
|
r := newWRig(t, time.Minute)
|
||||||
r.tr.block = make(chan struct{})
|
r.tr.block = make(chan struct{})
|
||||||
|
r.st.beatDelay = 20 * time.Millisecond
|
||||||
w := newProgressWorker(t, r, r.tr, uploads.WithHeartbeat(5*time.Millisecond, time.Hour))
|
w := newProgressWorker(t, r, r.tr, uploads.WithHeartbeat(5*time.Millisecond, time.Hour))
|
||||||
done := make(chan struct{})
|
done := make(chan struct{})
|
||||||
go func() { defer close(done); w.Process(context.Background(), r.spool(t, "a")) }()
|
go func() { defer close(done); w.Process(context.Background(), r.spool(t, "a")) }()
|
||||||
|
|||||||
Reference in New Issue
Block a user