Skip to content

Stabilize e2e logout propagation test#37408

Merged
silverwind merged 1 commit intogo-gitea:release/v1.26from
silverwind:fix-e2e-logout-flake-v1.26-2
Apr 24, 2026
Merged

Stabilize e2e logout propagation test#37408
silverwind merged 1 commit intogo-gitea:release/v1.26from
silverwind:fix-e2e-logout-flake-v1.26-2

Conversation

@silverwind
Copy link
Copy Markdown
Member

Backport of #37403 to release/v1.26.

The events › logout propagation e2e test was racing the SSE connection setup: if page2's SharedWorker had not finished registering its messenger by the time page1 triggered logout, the event was silently dropped and page2 stayed on the authenticated page.

Wait 500ms after verifying page2 is signed in, before triggering the logout from page1, so the SharedWorker has time to register. Comment points at a cleaner future fix (expose a ready attribute on the page) that will also work for the planned WebSocket SharedWorker.


This PR was written with the help of Claude Opus 4.7

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 24, 2026
@GiteaBot GiteaBot added this to the 1.26.1 milestone Apr 24, 2026
@silverwind silverwind added type/testing skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Apr 24, 2026
@silverwind silverwind changed the title Stabilise e2e logout propagation test (backport #37403) Stabilise e2e logout propagation test Apr 24, 2026
@silverwind silverwind removed this from the 1.26.1 milestone Apr 24, 2026
@silverwind silverwind changed the title Stabilise e2e logout propagation test Stabilize e2e logout propagation test Apr 24, 2026
@silverwind
Copy link
Copy Markdown
Member Author

#37403 was merged, this is ready.

Backport of go-gitea#37403 to release/v1.26.

Give page2's SharedWorker time to register its SSE connection on the
server before page1 triggers logout — otherwise the event can be
silently dropped when no messenger is registered yet for the user.

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
@silverwind silverwind force-pushed the fix-e2e-logout-flake-v1.26-2 branch from ac12d1e to f00c016 Compare April 24, 2026 15:49
@silverwind silverwind requested a review from bircni April 24, 2026 16:06
@silverwind silverwind force-pushed the fix-e2e-logout-flake-v1.26-2 branch from 0a53bc8 to f00c016 Compare April 24, 2026 16:07
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 24, 2026
@silverwind silverwind enabled auto-merge (squash) April 24, 2026 16:12
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 24, 2026
@silverwind silverwind merged commit 64d1202 into go-gitea:release/v1.26 Apr 24, 2026
51 checks passed
@silverwind silverwind deleted the fix-e2e-logout-flake-v1.26-2 branch April 24, 2026 16:20
@GiteaBot GiteaBot added this to the 1.26.1 milestone Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants