P2 redesign Phase 5 — prune/check/unlock + maintenance ticker + repo stats + pending-runs queue #3
@@ -145,7 +145,12 @@ func TestDrainPendingDispatchesOnReconnect(t *testing.T) {
|
|||||||
t.Errorf("backup tag: %q", got.Tag)
|
t.Errorf("backup tag: %q", got.Tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pending row should be gone.
|
// Pending row should be gone. Poll briefly: the drain goroutine
|
||||||
|
// sends command.run via conn.Send and only then calls
|
||||||
|
// DeletePendingRun. Reading the envelope off the wire above proves
|
||||||
|
// the send happened, but the delete runs after that on the drain
|
||||||
|
// goroutine — small window where the count is still 1.
|
||||||
|
waitForPendingCount(t, st, hostID, 0, 2*time.Second)
|
||||||
if n := countPendingForHost(t, st, hostID); n != 0 {
|
if n := countPendingForHost(t, st, hostID); n != 0 {
|
||||||
t.Errorf("pending rows after drain: got %d, want 0", n)
|
t.Errorf("pending rows after drain: got %d, want 0", n)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user