test: cover pagination, rate limits, malformed XDR, RPC failures, and… - #788
Merged
Nanle-code merged 1 commit intoJul 29, 2026
Merged
Conversation
… protocol-version changes deterministically
|
@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. |
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.
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.