Add proxy integration tests and missing UTS spec coverage#462
Open
paddybyers wants to merge 8 commits intouts-integrationfrom
Open
Add proxy integration tests and missing UTS spec coverage#462paddybyers wants to merge 8 commits intouts-integrationfrom
paddybyers wants to merge 8 commits intouts-integrationfrom
Conversation
- channel_faults.md: Remove incorrect RTL4h reference; the test that replaces ATTACHED with ERROR is RTL14, not RTL4h. Update test name, channel name prefix, and rule comment accordingly. - rest_faults.md: Fix spec point references from RSC15a to RSC15m/REC2c2 (the correct spec points for fallback host behaviour when the fallback domain set is empty). Update test title, comments, and channel names. - Update proxy binary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New proxy test specs: - Test 21 (RTN15j): Fatal ERROR mid-session → FAILED state - Test 22 (RTN15g/g2): connectionStateTtl expiry prevents resume - Test 23 (RTN19a/a2): Unacked messages resent after resume - Test 24 (RTL12): ATTACHED with resumed=false → channel UPDATE event - Test 25 (RTL3d): Channels reattach after connection recovery - Test 26 (RTN22/RTC8a): Server-initiated re-authentication - Test 27 (RTP17i/RTP17g): Presence re-enter on non-resumed reattach Also adds "Writing Proxy Tests" guidance to integration-testing.md covering late fault injection and two approaches for early faults. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move completion-status.md, integration-testing.md, and the two skill files (write-test-spec, write-derived-tests) into a new uts/docs/ directory. Strip skill frontmatter from the writing guides. Fix stale integration-proxy/ references to match actual integration/proxy/ layout. Rewrite README to reflect current spec counts and link to docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New specs: - RTB1: backoff and jitter for connection retries - RSA4a: token expiry with non-renewable tokens - RSA4c/d/f: auth callback error handling - RTN16: connection recovery (recovery key, msgSerial, channelSerials) - RTN20: network change events (browser-only) - RSF1/RTF1: forwards compatibility (unknown fields/actions) - RSH7: push channel subscriptions (unit + integration) Extended specs: - RTL22/MFI: message filter subscriptions (channel_subscribe) - RTN7e: error reason on publish failure (channel_publish) - CHD2/CHM2: all ChannelMetrics fields (rest_channel_attributes) - RTN16d/RTN16l: proxy-based recovery tests (connection_resume) Updates completion-status.md and README spec counts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4 tasks
…uccess Tests that a request completing successfully against a cached fallback host after fallbackRetryTimeout has expired does not re-pin that host. Uses the existing onRequest handler with a held PendingRequest pattern rather than introducing a new mock primitive. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rame Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Go test proxy has moved to https://github.com/ably/uts-proxy. Updated references in README, writing guide, and proxy infrastructure spec to point to the external repo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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/, rewrote README as a concise entry point, addedwriting-derived-tests.mdfor translating UTS specs to language-specific tests.Proxy approach
The test proxy (
uts/proxy/) is a Go binary that:POST /sessions— each session gets its own listener port and targets a specific upstream (sandbox-realtime/sandbox-rest)POST /sessions/:id/actionsfor ad-hoc fault injection mid-testGET /sessions/:id/logSDK test harnesses (e.g. ably-js) build and auto-launch the proxy from their test setup — no manual proxy startup needed.
Proxy integration test specs added
connection_resume.mdchannel_faults.mdheartbeat.mdrest_faults.mdauth_reauth.mdpresence_reentry.mdconnection_open_failures.mdMissing unit/integration specs added
backoff_jitter_test.mdtoken_expiry_non_renewable_test.mdauth_callback_errors_test.mdconnection_recovery_test.mdforwards_compatibility_test.mdnetwork_change_test.mdpush_channels.md(unit + integration)channel_subscribe.md(extended)channel_publish.md(extended)rest_channel_attributes.md(extended)Test plan
cd uts/proxy && go build -o test-proxy .🤖 Generated with Claude Code