You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/main.yml
+22-9Lines changed: 22 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -257,7 +257,9 @@ jobs:
257
257
echo "Running integration tests on Lucee ${{ matrix.lucee }}..."
258
258
FAILED=false
259
259
RESULTS=""
260
-
for test in test-websocket-client test-lifecycle-callbacks test-return-value-send test-wsclient-broadcast test-wsclients-plural test-binary-send test-close; do
260
+
# test-session-access parked pending LDEV-6277 (wsClient.getSession() not exposed) —
261
+
# re-add once the Java fix lands
262
+
for test in test-websocket-client test-lifecycle-callbacks test-return-value-send test-wsclient-broadcast test-wsclients-plural test-binary-send test-close test-onfirstopen-rearm test-onopen-async test-request-timeout; do
for test in test-websocket-client test-lifecycle-callbacks test-return-value-send test-wsclient-broadcast test-wsclients-plural test-binary-send test-close; do
355
+
for test in test-websocket-client test-lifecycle-callbacks test-return-value-send test-wsclient-broadcast test-wsclients-plural test-binary-send test-close test-onfirstopen-rearm test-onopen-async test-request-timeout; do
354
356
if [ -f /tmp/${test}.txt ] && grep -q "FAILED" /tmp/${test}.txt; then
355
357
echo "" >> $GITHUB_STEP_SUMMARY
356
358
echo "#### ${test}" >> $GITHUB_STEP_SUMMARY
@@ -395,14 +397,25 @@ jobs:
395
397
lucee-express/lucee-server/context/logs/
396
398
397
399
test-config-override:
398
-
name: Test - Config override + reflection hot-reinstall
400
+
name: Test - Config override (${{ matrix.override-mode }})
-[`test-idle-timeout.cfm`](test-idle-timeout.cfm) — [LDEV-6219](https://luceeserver.atlassian.net/browse/LDEV-6219): per-listener `property idleTimeout` must apply to every session on that listener, not just the first.
11
+
-[`WebSocketInfo.cfc`](WebSocketInfo.cfc) / [`WebSocketListener.cfc`](WebSocketListener.cfc) / [`TestPlaceholder.cfc`](TestPlaceholder.cfc) — support CFCs.
12
+
-[`websockets/`](websockets/) — listener CFCs (`TestListener`, `TimeoutListener`) dropped into the configured websockets directory.
13
+
14
+
Driven by CI via `curl` against a Lucee Express instance with the built `.lex` installed — see `.github/workflows/main.yml`.
These tests use [`CreateWebSocketClient`](https://github.com/lucee/extension-websocket-client) as the driver against listeners registered by this extension — so every integration test exercises **both** extensions together.
21
+
22
+
## Why integration tests live here, not in the client repo
23
+
24
+
Every integration test needs both extensions running. Duplicating the suite across two repos guarantees drift. Instead:
25
+
26
+
- One copy lives here (server repo) — the server is the thing being driven.
27
+
- The client repo's `test-integration` job **sparse-checkouts**`tests/integration/` from this repo, builds its branch's client `.lex`, pulls the latest server `.lex` from download.lucee.org, and runs the suite against the combined pair.
28
+
- Each side's CI catches the bug on its own side — server changes fail here, client changes fail in [extension-websocket-client](https://github.com/lucee/extension-websocket-client).
29
+
30
+
## What fails where
31
+
32
+
| Bug source | Caught by |
33
+
| --- | --- |
34
+
| Extension load, `websocketInfo()` shape, per-listener config | Extension tests in this repo (`tests/*.cfm`) |
35
+
| Server callback firing, broadcast, lifecycle, `wsClient` / `wsClients` APIs | Integration tests in this repo (`tests/integration/`) |
36
+
| Reflection fallback after Lucee restart (LDEV-6221) |`test-reflection-restart.cfm` (integration, Linux-only in CI) |
37
+
| Config overrides (env var, custom directory) |`test-config-override.cfm` (separate CI job, needs altered env) |
38
+
| Client BIF contract (scheme handling, error shape, connection timing) | Unit tests in [extension-websocket-client](https://github.com/lucee/extension-websocket-client/tree/master/tests)|
39
+
| Client send/receive, lifecycle, reconnect | Integration tests here — fail in both repos' CI |
40
+
41
+
## Adding a test
42
+
43
+
**Needs the WebSocket server contract (listener callbacks, broadcast, lifecycle)?** Add it to [`tests/integration/`](integration/). Both this repo's CI and the client repo's `test-integration` job will pick it up.
44
+
45
+
**Extension-level only (BIF output, config loading, startup behaviour)?** Add a `test-*.cfm` at the top level of `tests/` and wire it into the `test` job in [`.github/workflows/main.yml`](../.github/workflows/main.yml).
46
+
47
+
**Listener CFCs under test** go in `tests/integration/websockets/` (integration) or `tests/websockets/` (extension-level). Both directories are mapped as the websockets directory in their respective CI job.
48
+
49
+
## Running locally
50
+
51
+
Build the extension:
52
+
53
+
```bash
54
+
mvn clean install
55
+
```
56
+
57
+
Drop `target/*.lex` into a Lucee Express instance's `{lucee-config}/deploy/` folder, copy the test listener CFCs into `{lucee-config}/websockets/`, then `curl` the `.cfm` scripts:
Integration tests also need the [websocket-client extension](https://github.com/lucee/extension-websocket-client) installed in the same Lucee instance. The CI workflow ([`.github/workflows/main.yml`](../.github/workflows/main.yml)) shows the full setup.
0 commit comments