Skip to content

fix: Fix TestSignalEnvironment to prevent flaky signal tests#2178

Merged
caalador merged 2 commits intomainfrom
fix-signal-env
Mar 31, 2026
Merged

fix: Fix TestSignalEnvironment to prevent flaky signal tests#2178
caalador merged 2 commits intomainfrom
fix-signal-env

Conversation

@Artur-
Copy link
Copy Markdown
Member

@Artur- Artur- commented Mar 31, 2026

Use registerFirst() so TestSignalEnvironment takes priority over VaadinServiceEnvironment for effect dispatching. Return null from getResultNotifier() so result notifications run synchronously on the calling thread. Use deadline-based polling in runPendingTasks() to handle tasks that arrive after initial queue drain. Re-acquire the session lock before running each task so DOM operations work when effects run directly on the test thread.

Artur- added 2 commits March 31, 2026 06:26
Use registerFirst() so TestSignalEnvironment takes priority over
VaadinServiceEnvironment for effect dispatching. Return null from
getResultNotifier() so result notifications run synchronously on the
calling thread. Use deadline-based polling in runPendingTasks() to
handle tasks that arrive after initial queue drain. Re-acquire the
session lock before running each task so DOM operations work when
effects run directly on the test thread.
@caalador caalador merged commit c535154 into main Mar 31, 2026
10 checks passed
@caalador caalador deleted the fix-signal-env branch March 31, 2026 07:18
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