diff --git a/docs/changes/unreleased/2184-kept-turn-test.md b/docs/changes/unreleased/2184-kept-turn-test.md new file mode 100644 index 0000000000..bc2958f979 --- /dev/null +++ b/docs/changes/unreleased/2184-kept-turn-test.md @@ -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] +--- diff --git a/internal/syncsetup/drive_refusal_safety_test.go b/internal/syncsetup/drive_refusal_safety_test.go index 38f9f8cda8..4c76fec669 100644 --- a/internal/syncsetup/drive_refusal_safety_test.go +++ b/internal/syncsetup/drive_refusal_safety_test.go @@ -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)) @@ -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) }