Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/changes/unreleased/2184-kept-turn-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
kind: internal
title: The kept-turn ownership test lets the store answer so the branch can upload
pr: 2184
surface: [chat]
---
5 changes: 4 additions & 1 deletion internal/syncsetup/drive_refusal_safety_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ func TestOwnershipCheckThatFindsAnotherHolderKeepsUnsentTurns(t *testing.T) {
if _, err := h.continuerB().Take(ctx, h.cell.ID); err != nil {
t.Fatal(err)
}
// Keeping the turn uploads it as a branch, so the store must answer; A's
// heartbeats stay refused so only the check can learn of the move.
h.quiet.Store(true)
h.block.set(false)
// The check alone, not a later flush, keeps the turn: it is kept by the
// time the check returns.
mustNil(t, a.drive.CheckLease(ctx))
Expand All @@ -137,5 +141,4 @@ func TestOwnershipCheckThatFindsAnotherHolderKeepsUnsentTurns(t *testing.T) {
if a.drive.Gate() == nil {
t.Fatal("a displaced window still admits work")
}
h.block.set(false)
}