Skip to content

test(reliability): add connect/disconnect soak load test (Week 4) - #64

Open
Harxhit wants to merge 1 commit into
mainfrom
test/connect-disconnect-soak
Open

test(reliability): add connect/disconnect soak load test (Week 4)#64
Harxhit wants to merge 1 commit into
mainfrom
test/connect-disconnect-soak

Conversation

@Harxhit

@Harxhit Harxhit commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Note: authored by Claude (Anthropic) via Claude Code. Not yet executed against a live backend — results section is a placeholder, not fabricated.


Summary by cubic

Adds a connect/disconnect soak load test to validate that the signaling server releases resources cleanly under sustained connection churn. No server code changes; this is test tooling only.

  • The driver (load-test/connect-disconnect-soak.js) churns connect → optional joinRoom → disconnect cycles, reporting latency percentiles, error counts, and throughput.
  • Leak detection is server-side: compare backend RSS and mediasoup/socket-map counts before and after the run; they should return to baseline after the settle window.
  • load-test/results/CONNECT-DISCONNECT-SOAK.md documents the run procedure, CLI arguments, and the leak-detection methodology.
  • Not yet run against a live backend, so the results table is a placeholder, not fabricated numbers.

Written for commit fb09e59. Summary will update on new commits.

Review in cubic

Adds a Socket.IO connect -> (optional joinRoom) -> disconnect churn driver
to validate server-side resource cleanup (no leak) under sustained
connection turnover, plus a README documenting the run + leak-detection
procedure.

- load-test/connect-disconnect-soak.js — churn driver; reports connect/join
  latency, success/failure, throughput; optional --join and --metricsUrl
- load-test/results/CONNECT-DISCONNECT-SOAK.md — how to run, args, and the
  server-side RSS/resource baseline procedure for detecting leaks

Note: authored by Claude (Anthropic) via Claude Code. Not yet executed
against a live backend — results section is a placeholder, not fabricated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 75e061ff-d8d4-4386-8408-843798655d65


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
7.6% Duplication on New Code (required ≤ 3%)
B Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="load-test/connect-disconnect-soak.js">

<violation number="1" location="load-test/connect-disconnect-soak.js:139">
P2: When `--join true` is used, this branch only sends `joinRoom` before disconnecting, so it never allocates a viewer transport or consumer. Run the remaining viewer signaling steps in this soak, or narrow the cleanup claim to room-viewer state.</violation>

<violation number="2" location="load-test/connect-disconnect-soak.js:258">
P2: When connections or joins fail, this command still exits with status 0, so CI or automation cannot detect a failed soak. Exit nonzero when cycles are incomplete or any connect/join error is recorded.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic


results.connectMs.push(performance.now() - connectStart);

if (JOIN) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: When --join true is used, this branch only sends joinRoom before disconnecting, so it never allocates a viewer transport or consumer. Run the remaining viewer signaling steps in this soak, or narrow the cleanup claim to room-viewer state.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At load-test/connect-disconnect-soak.js, line 139:

<comment>When `--join true` is used, this branch only sends `joinRoom` before disconnecting, so it never allocates a viewer transport or consumer. Run the remaining viewer signaling steps in this soak, or narrow the cleanup claim to room-viewer state.</comment>

<file context>
@@ -0,0 +1,261 @@
+
+    results.connectMs.push(performance.now() - connectStart);
+
+    if (JOIN) {
+      try {
+        const { response, latencyMs } = await ackWithTimeout(
</file context>

}
}

process.exit(0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: When connections or joins fail, this command still exits with status 0, so CI or automation cannot detect a failed soak. Exit nonzero when cycles are incomplete or any connect/join error is recorded.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At load-test/connect-disconnect-soak.js, line 258:

<comment>When connections or joins fail, this command still exits with status 0, so CI or automation cannot detect a failed soak. Exit nonzero when cycles are incomplete or any connect/join error is recorded.</comment>

<file context>
@@ -0,0 +1,261 @@
+    }
+  }
+
+  process.exit(0);
+}
+
</file context>

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.

1 participant