Skip to content

Conversation

@overcat
Copy link
Member

@overcat overcat commented Jun 19, 2025

No description provided.

@overcat overcat requested a review from Copilot June 19, 2025 02:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

Attention: Patch coverage is 71.42857% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.21%. Comparing base (dc2b705) to head (9751f33).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/main/java/org/stellar/sdk/SorobanServer.java 71.42% 2 Missing and 2 partials ⚠️
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     
Files with missing lines Coverage Δ
src/main/java/org/stellar/sdk/SorobanServer.java 84.03% <71.42%> (-0.89%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@overcat overcat enabled auto-merge (squash) June 19, 2025 02:39
@overcat overcat merged commit 2989e9b into master Jun 19, 2025
9 checks passed
@overcat overcat deleted the feat-poll-tx branch June 19, 2025 05:48
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.

2 participants