tests: cover documented recipe claims that had no test#19
Merged
Conversation
Adds integration tests for gaps spotted against docs/recipes/websocket-extension.md: - test-session-access: getSession().getId/getUserProperties/getRequestParameterMap; multi-tab (per-connection session ids, per-connection userProperties isolation); handshake isolation (cookie + form scopes empty in listener) - test-onfirstopen-rearm: onFirstOpen fires again after onLastClose drains the channel - test-onopen-async: onOpenAsync runs on a different thread than onOpen - test-request-timeout: requestTimeout kills long-running work inside onFirstOpen Also splits test-config-override into a matrix covering both the env-var (LUCEE_WEBSOCKET_CONFIG) and JVM arg (-Dlucee.websocket.config=) override paths — only the env-var path was previously exercised. CI log-dump glob widened from /tmp/ws-*-events.log to /tmp/ws-*.log so newly added event logs get dumped on failure.
The async onLastClose thread races the sample window. The real claim is that onFirstOpen fires twice; onLastClose existence is already covered by test-lifecycle-callbacks.
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.
Summary
docs/recipes/websocket-extension.md; adds integration tests for every gap except JWT/Example-Listener patterns (deferred — different scope).tests/README.mddocumenting the two-tier structure (extension tests vs integration tests) and the cross-repo relationship withextension-websocket-client.test-config-overrideinto a matrix overenv-var(LUCEE_WEBSOCKET_CONFIG) andjvm-arg(-Dlucee.websocket.config=) — only the env-var path was previously exercised.New integration tests
test-session-access+SessionAccessListener— exerciseswsClient.getSession()accessors (getId/getUserProperties/getRequestParameterMap), multi-tab per-connection identity, and handshake cookie/form scope isolation. Parked in CI pending LDEV-6277 — thegetSession()accessor isn't exposed onWSClient; re-enable once the Java fix lands.test-onfirstopen-rearm+RearmListener— assertsonFirstOpenre-fires after the channel drains (documented re-arm behaviour).test-onopen-async+OnOpenAsyncListener— assertsonOpenAsyncruns on a different thread thanonOpen.test-request-timeout+LongOnFirstOpenListener— assertsrequestTimeoutkills long-running work insideonFirstOpen(the documented warning againstwhile-loops there).Incidental workflow tweaks
/tmp/ws-*-events.log→/tmp/ws-*.logso new test listeners get their logs dumped on failure.Test plan
test-config-overridematrix jobs (env-var + jvm-arg) passtest-websocket-info,test-idle-timeout, existing integration suite still greentest-session-accessparked, with pointer to LDEV-6277 for re-enable