fix: stop store-bound workers and reconcile settled repair fixtures
This commit is contained in:
@@ -100,11 +100,22 @@ func TestRuntimeRepairRejectsUnrecordedAndActiveVisits(t *testing.T) {
|
||||
h, _, id := sessionExportRunner(t, "v2", func(stage.SessionExportRequest) (stage.SessionExportResult, error) {
|
||||
return stage.SessionExportResult{}, errors.New("unavailable")
|
||||
})
|
||||
for _, sequence := range []int{0, 1, 2} {
|
||||
for _, sequence := range []int{0, 2} {
|
||||
if _, err := h.runner.repairSessionExport(context.Background(), id, sequence); err == nil {
|
||||
t.Fatalf("invalid visit %d accepted", sequence)
|
||||
}
|
||||
}
|
||||
// The shared fixture now confirms executor cleanup, as the runtime should.
|
||||
// Explicitly model an in-flight executor for the active-visit repair case.
|
||||
h.runner.mu.Lock()
|
||||
h.runner.active[id] = activeRun{cancel: func() {}}
|
||||
h.runner.mu.Unlock()
|
||||
if _, err := h.runner.repairSessionExport(context.Background(), id, 1); err == nil {
|
||||
t.Fatal("active visit accepted for export repair")
|
||||
}
|
||||
h.runner.mu.Lock()
|
||||
delete(h.runner.active, id)
|
||||
h.runner.mu.Unlock()
|
||||
}
|
||||
|
||||
func TestCLIRepairSessionExportUsesRuntimeProtocol(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user