Conversation
…tion status with retry strategy.
There was a problem hiding this comment.
Pull Request Overview
This PR adds the pollTransaction method to the SorobanServer to implement a retry strategy when polling for a transaction status. Key changes include:
- Added two overloads of pollTransaction in SorobanServer.java.
- Integrated a new SleepStrategy functional interface.
- Introduced unit tests in SorobanServerTest.java and updated resource files to simulate NOT_FOUND responses.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/main/java/org/stellar/sdk/SorobanServer.java | Added pollTransaction methods with retry logic and SleepStrategy interface. |
| src/test/java/org/stellar/sdk/SorobanServerTest.java | Added unit tests for pollTransaction using a simulated dispatcher. |
| src/test/resources/soroban_server/get_transaction_not_found.json | New response file for the NOT_FOUND transaction scenario. |
| CHANGELOG.md | Updated changelog to include the pollTransaction feature. |
Comments suppressed due to low confidence (1)
src/test/java/org/stellar/sdk/SorobanServerTest.java:518
- Consider adding tests for the failure scenario when the polling exceeds the maximum attempts (always returning NOT_FOUND) and tests verifying that an IllegalArgumentException is thrown if maxAttempts is less than or equal to 0.
public void testPollTransaction() throws IOException, SorobanRpcException, InterruptedException {
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #696 +/- ##
============================================
- Coverage 80.23% 80.21% -0.03%
- Complexity 1228 1232 +4
============================================
Files 213 213
Lines 4853 4867 +14
Branches 413 415 +2
============================================
+ Hits 3894 3904 +10
- Misses 705 707 +2
- Partials 254 256 +2
🚀 New features to boost your workflow:
|
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.
No description provided.