Skip to content

test: cover pagination, rate limits, malformed XDR, RPC failures, and… - #788

Merged
Nanle-code merged 1 commit into
Nanle-code:masterfrom
Agencybuilds:fix/msw-deterministic-tests
Jul 29, 2026
Merged

test: cover pagination, rate limits, malformed XDR, RPC failures, and…#788
Nanle-code merged 1 commit into
Nanle-code:masterfrom
Agencybuilds:fix/msw-deterministic-tests

Conversation

@Agencybuilds

Copy link
Copy Markdown
Contributor

Closes #784

Description: This PR addresses testing coverage gaps related to various edge cases and failure paths when interacting with the Stellar Horizon and Soroban RPC APIs. By utilizing Mock Service Worker (MSW), we introduce robust deterministic tests that simulate failure scenarios and ensure the application correctly handles these conditions.

Changes Included:

Pagination Parameters: Added tests to verify that fetchTransactions passes limit and cursor query parameters accurately to the Horizon API.
Rate Limits (429 Too Many Requests): Validates that the application appropriately bubbles up or handles API throttling errors.
Malformed XDR Submission: Mocks a 400 Bad Request from Horizon representing a transaction_malformed error (simulating an invalid XDR payload) to ensure graceful error surface.
RPC Failures (500 Internal Error): Ensures that a failure on a Soroban RPC node (e.g. 500 error) registers correctly when probing the network (sets node status to down).
Protocol-Version Changes: Validates that changes to the reported core or horizon protocol versions through the root Horizon endpoint are seamlessly handled by our network probe.
Testing Strategy: All tests run locally via MSW intercepts in stellar-api.spec.ts, mocking real-world boundary cases without actual network dependencies.

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Agencybuilds is attempting to deploy a commit to the nanle-code's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Nanle-code
Nanle-code merged commit 68fa3b7 into Nanle-code:master Jul 29, 2026
7 of 23 checks passed
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.

[2026 Testing] Build reusable Horizon and Soroban RPC fixtures

2 participants