Skip to content

feat: support Signals in multi-user context API#59

Merged
mshabarov merged 2 commits into
mainfrom
feat/browserless_context_signals_support
May 12, 2026
Merged

feat: support Signals in multi-user context API#59
mshabarov merged 2 commits into
mainfrom
feat/browserless_context_signals_support

Conversation

@mcollovati
Copy link
Copy Markdown
Contributor

BrowserlessApplicationContext / BrowserlessUserContext / BrowserlessUIContext did not register the test SignalEnvironment, so signal effects ran on the real thread pool and tests driving the context API could not flush them deterministically. Two smaller DSL methods — fireShortcut and test(Class, Y) — were also missing compared to BrowserlessTest.

Register TestSignalEnvironment over the application context lifecycle and expose runPendingSignalsTasks, fireShortcut, and the explicit tester test(Class, Y) on BrowserlessUIContext.

`BrowserlessApplicationContext` / `BrowserlessUserContext` /
`BrowserlessUIContext` did not register the test `SignalEnvironment`, so
signal effects ran on the real thread pool and tests driving the context
API could not flush them deterministically. Two smaller DSL methods —
`fireShortcut` and `test(Class, Y)` — were also missing compared to
`BrowserlessTest`.

Register `TestSignalEnvironment` over the application context lifecycle
and expose `runPendingSignalsTasks`, `fireShortcut`, and the explicit
tester `test(Class, Y)` on `BrowserlessUIContext`.
Comment thread junit6/src/test/java/com/vaadin/browserless/SignalsContextTest.java
Strengthen `applicationContextClose_unregistersSignalEnvironment` to
directly verify both that `BrowserlessApplicationContext` clears its
`signalsTestEnvironment` reference and that the global signal registry
no longer routes through the (now orphaned) test queue.
@mshabarov mshabarov merged commit 5ae6467 into main May 12, 2026
7 checks passed
@mshabarov mshabarov deleted the feat/browserless_context_signals_support branch May 12, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants