Skip to content

test: fix swapped ErrorInfo code/statusCode assertions - #1253

Open
SimonWoolf wants to merge 1 commit into
mainfrom
fix-errorinfo-order-tests
Open

SimonWoolf wants to merge 1 commit into
mainfrom
fix-errorinfo-order-tests

Conversation

@SimonWoolf

@SimonWoolf SimonWoolf commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

#1248 fixed the ErrorInfo constructor argument order for client-side errors (status code before Ably code). RealtimeChannelTest.channels_get_should_throw_when_would_cause_reattach had asserted the old swapped values (code == 400, statusCode == 40000), so it has failed on main's Integration Test workflow since #1248 merged. This swaps the assertions to code == 40000, statusCode == 400.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Corrected the expected error code and HTTP status in a channel reattachment test.

… test

#1248 corrected the ErrorInfo argument order; the test had encoded the old swapped values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 280cf797-01bc-4a6f-adea-069e674b1b6f
📥 Commits

Reviewing files that changed from the base of the PR and between b214ef7 and 5eb83bc.

📒 Files selected for processing (1)
  • lib/src/test/java/io/ably/lib/test/realtime/RealtimeChannelTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The reattach error test now expects error code 40000 and HTTP status code 400.

Changes

Channel error expectations

Layer / File(s) Summary
Correct reattach error expectation
lib/src/test/java/io/ably/lib/test/realtime/RealtimeChannelTest.java
The test now expects error code 40000 and HTTP status code 400.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 5eb83

The test expectations match the error fields produced by the exercised path. No actionable merge-blocking risk is evident.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the main change: correcting swapped ErrorInfo code and statusCode assertions in a test.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checked the code one day
The status found its proper place
Four-zero-zero, the test now sees
Four-zero-zero-zero-zero, too
Then hopped away among the trees

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

This branch was successfully deployed

2 active deployments
staging/pull/1253/javadoc — 5eb83bc7 Deployed Oct 13, 2026 by github-actions[bot]
staging/pull/1253/features — 5eb83bc7 Deployed Oct 13, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant