From 257d7bd60e5135645b222758bbab67056baddbd9 Mon Sep 17 00:00:00 2001 From: santoshkumarradha Date: Mon, 2 Nov 2026 05:18:49 -0500 Subject: [PATCH 1/2] tests: the stale-publish test waits for the announced move, not the first viewer line Since #1971 a displaced window refuses work at once, first with an unnamed line while the holder's name is read, and announces the move only after its pending saves settle. TestStalePublishRefusalMakesViewerAndNotifiesOnce came from dev, where the line was set together with the notices, and waited only for any viewer line. With the real engine it then read the unnamed line or an empty notice list (1 in 3 to 1 in 10 runs alone). It now waits for the announcement, the settled state, and its assertions are unchanged. --- internal/syncsetup/drive_refusal_safety_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/syncsetup/drive_refusal_safety_test.go b/internal/syncsetup/drive_refusal_safety_test.go index 059731fd50..38f9f8cda8 100644 --- a/internal/syncsetup/drive_refusal_safety_test.go +++ b/internal/syncsetup/drive_refusal_safety_test.go @@ -46,7 +46,10 @@ func TestStalePublishRefusalMakesViewerAndNotifiesOnce(t *testing.T) { } h.block.set(false) want := chatlist.Superseded(nameB) - waitFor(t, "A to become a viewer after stale publish", func() bool { _, viewer := a.drive.Viewer(); return viewer }) + // The window refuses work at once, first with an unnamed line while the + // holder's name is read, and announces the move once pending saves have + // settled (#1971). The announcement is the settled state. + waitFor(t, "A to announce the move after stale publish", func() bool { return h.wall.has(want) }) if line, viewer := a.drive.Viewer(); !viewer || line != want { t.Fatalf("viewer = %q, %v; want %q, true", line, viewer, want) } From 58d7ece45cd87a25edfba38f3234eba4f38bd997 Mon Sep 17 00:00:00 2001 From: santoshkumarradha Date: Mon, 2 Nov 2026 05:19:00 -0500 Subject: [PATCH 2/2] docs: change entry for this pull request --- docs/changes/unreleased/2185-stale-publish-test.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 docs/changes/unreleased/2185-stale-publish-test.md diff --git a/docs/changes/unreleased/2185-stale-publish-test.md b/docs/changes/unreleased/2185-stale-publish-test.md new file mode 100644 index 0000000000..405d5b9048 --- /dev/null +++ b/docs/changes/unreleased/2185-stale-publish-test.md @@ -0,0 +1,6 @@ +--- +kind: internal +title: The stale-publish test waits for the announced move, not the first viewer line +pr: 2185 +surface: [chat] +---