Skip to content

Make websocket test more robust - #740

Merged
rkistner merged 1 commit into
mainfrom
fix-ws-crash-tests
Jul 29, 2026
Merged

Make websocket test more robust#740
rkistner merged 1 commit into
mainfrom
fix-ws-crash-tests

Conversation

@rkistner

Copy link
Copy Markdown
Contributor

Ran into this test error right after merging #738:

packages/rsocket-router test: Vitest caught 1 unhandled error during the test run.
packages/rsocket-router test: This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.
packages/rsocket-router test: ⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯
packages/rsocket-router test: EnvironmentTeardownError: [vitest-worker]: Closing rpc while "onUserConsoleLog" was pending
packages/rsocket-router test: This error originated in "test/src/socket.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.

I could not actually reproduce it, but Codex recommended this fix: Wait for the websocket server to close asynchronously in the afterEach callback.

AI Usage

Fix recommended and implemented by Codex gpt-5.6.

@rkistner
rkistner requested a review from stevensJourney July 29, 2026 12:53
@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1d89922

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rkistner
rkistner merged commit 591fd67 into main Jul 29, 2026
115 checks passed
@rkistner
rkistner deleted the fix-ws-crash-tests branch July 29, 2026 13:29
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