Skip to content

Optimized RestClient Tests using customized Retry Handler#6359

Merged
san81 merged 1 commit into
opensearch-project:mainfrom
eatulban:feature/RestclientTest-retry-optimization
Jan 8, 2026
Merged

Optimized RestClient Tests using customized Retry Handler#6359
san81 merged 1 commit into
opensearch-project:mainfrom
eatulban:feature/RestclientTest-retry-optimization

Conversation

@eatulban

Copy link
Copy Markdown
Contributor

Description

Refactored Office365RestClient Tests using New RetryHandler, reducing test execution time from 17 minutes to 50 seconds.

Performance Summary

  • Total test duration: 17m 3.8s → 49.5s (95.2% faster)
  • Office365RestClientTest: 16m 18s → 6.2s (99.4% faster)

Test Report Details

Old Test Report(6 Retries for tests):

{0C68270F-187F-4D7F-A03D-14202CEFF697}

New Test Report(1 Retries for tests):

{AA6E813F-C46E-4533-8F3B-38248A0620E2}

How

Introduced configurable retry strategies and set maxRetries = 1 for unit tests to eliminate unnecessary exponential backoff waits.

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@wandna-amazon

wandna-amazon commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

Nice, big win on build time for this. Seems like the gradle build is failing though.

edit: looks like the same gradle build error is happening on all recent PRs

Signed-off-by: eatulban <eatulban@amazon.com>
@eatulban eatulban force-pushed the feature/RestclientTest-retry-optimization branch from 2980ad1 to 6c5de89 Compare January 7, 2026 06:05
@san81 san81 merged commit 36d1318 into opensearch-project:main Jan 8, 2026
48 of 51 checks passed
wandna-amazon pushed a commit to wandna-amazon/data-prepper that referenced this pull request Jan 8, 2026
…-project#6359)

Signed-off-by: eatulban <eatulban@amazon.com>
Signed-off-by: Nathan Wand <wandna@amazon.com>
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
…-project#6359)

Signed-off-by: eatulban <eatulban@amazon.com>
Signed-off-by: Simon ELBAZ <elbazsimon9@gmail.com>
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
simonelbaz pushed a commit to simonelbaz/data-prepper that referenced this pull request Jan 31, 2026
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.

5 participants