Stabilize e2e logout propagation test#37403
Merged
silverwind merged 6 commits intogo-gitea:mainfrom Apr 24, 2026
Merged
Conversation
wxiaoguang
reviewed
Apr 24, 2026
When a user has multiple tabs open and one triggers logout while another is still establishing its SSE connection, the previous SendMessageBlocking would silently drop the event because no messenger was registered yet. Add SendMessageBlockingWithRetry which polls up to a deadline for a messenger to appear, and use it from SignOut with a 500ms budget. Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
547aae7 to
72f3a0d
Compare
wxiaoguang
requested changes
Apr 24, 2026
Contributor
wxiaoguang
left a comment
There was a problem hiding this comment.
Sorry, I don't think such backend retry is right. The data-race can happen anywhere.
If you think it is a data-race and it needs a "delay", you can add the delay in the frontend's test.
Member
Author
|
I guess I'm fine to add a hack in the test too. EventSource should be replaced with websocket soon so we don't have to carry such a hack for too long. |
…ions" This reverts commit 72f3a0d.
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>
Member
Author
|
It's back to test timeout. |
wxiaoguang
reviewed
Apr 24, 2026
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
wxiaoguang
approved these changes
Apr 24, 2026
bircni
approved these changes
Apr 24, 2026
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Apr 24, 2026
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
added a commit
that referenced
this pull request
Apr 24, 2026
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 Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
silverwind
added a commit
to mohammad-rj/gitea
that referenced
this pull request
Apr 24, 2026
* origin/main: Stabilize e2e logout propagation test (go-gitea#37403) refactor: serve site manifest via `/assets/site-manifest.json` endpoint (go-gitea#37405) feat(security): set X-Content-Type-Options: nosniff by default (go-gitea#37354) # Conflicts: # tests/e2e/events.test.ts
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Apr 25, 2026
* origin/main: (51 commits) Fix color regressions, add `priority` color (go-gitea#37417) [skip ci] Updated translations via Crowdin Stabilize e2e logout propagation test (go-gitea#37403) refactor: serve site manifest via `/assets/site-manifest.json` endpoint (go-gitea#37405) feat(security): set X-Content-Type-Options: nosniff by default (go-gitea#37354) Refactor pull request view (1) (go-gitea#37380) Improve AGENTS.md (go-gitea#37382) Remove dead CSS (go-gitea#37376) Add pr-review e2e test and speed up e2e tests (go-gitea#37345) Drop Fomantic tab, checkbox and form patches (go-gitea#37377) fix: dump with default zip type produces uncompressed zip (go-gitea#37401) Allow fast-forward-only merge when signed commits are required (go-gitea#37335) Introduce `ActionRunAttempt` to represent each execution of a run (go-gitea#37119) Move review request functions to a standalone file (go-gitea#37358) Fix repo init README EOL (go-gitea#37388) Fix org team assignee/reviewer lookups for team member permissions (go-gitea#37365) Remove external service dependencies in migration tests (go-gitea#36866) Extend issue context popup beyond markdown content (go-gitea#36908) fix: commit status reporting (go-gitea#37372) Support for Custom URI Schemes in OAuth2 Redirect URIs (go-gitea#37356) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
events › logout propagatione2e test (example flake) 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