Improved SDK Test Handling for Network Connectivity Issues#279
Open
dxbr wants to merge 2 commits intorecallnet:mainfrom
Open
Improved SDK Test Handling for Network Connectivity Issues#279dxbr wants to merge 2 commits intorecallnet:mainfrom
dxbr wants to merge 2 commits intorecallnet:mainfrom
Conversation
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.
SDK Test Improvement: Network Error Handling
Overview
This update addresses a critical issue in the SDK test suite, specifically with the
can_deposit_into_subnettest. Previously, the test would panic and fail if there was no local subnet available, causing unnecessary errors during the testing process. This update improves the test's robustness by gracefully handling network connectivity errors and ensuring that the test skips when the network is unavailable, instead of causing a panic.Key Changes
anyhow::Resultinstead of unwrapping, enabling better error handling.reqwest, allowing the test to detect network issues.reqwestas a shared-workspace dependency for testing the connectivity checks.Cargo.lockto support the new error handling logic.Testing & Results
cargo test, confirming that all tests passed without introducing new issues.Summary
This fix ensures that SDK tests are more resilient to network failures, preventing unnecessary panics and improving the overall test experience for developers. By adding better error handling and skipping tests when appropriate, this update provides a more stable and predictable testing environment.