You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dc3ec65
Browse filesBrowse the repository at this point in the historyBrowse files
test(sessions): a lease that cannot be taken keeps the session, and does not stop a resume
Prune fails closed when it cannot take a session's lease at all, so a
process whose own hold fails the same way can carry on: prune cannot
remove the session either. Refusing there instead would stop resume
and fork wherever locking does not work, for people who never prune.
ifreason:=keptReason(report, "old"); !strings.HasPrefix(reason, "its lease could not be checked") ||len(report.Removed) !=0||len(report.Failed) !=0 {
476
+
t.Fatalf("dry run %v: kept for %q, removed %v, failed %v, want it kept because its lease could not be checked", dryRun, reason, pruneIDs(report.Removed), pruneIDs(report.Failed))
477
+
}
478
+
}
479
+
if!sessionDirExists(t, root, "old") {
480
+
t.Fatal("a session whose lease could not be checked was removed")
0 commit comments