Skip to content

Conversation

@marychatte
Copy link
Member

Subsystem
Client, HttpRequestRetry

Motivation
KTOR-5850

Solution
HttpSend plugin has its own counter for attempts, and the default value is 20. Users can configure it:

install(HttpSend) {
    maxSendCount = 25
}

HttpRequestRetry plugin also has its own value maxRetries, which can be bigger than 20. The solution is to use HttpRequestRetry.maxRetries for HttpSend if it's configured

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch marychatte/KTOR-5850-HttpRequestRetry-SendCountExceedException-when-max-retries-is-more-than-maxSendCount-of-HttpSend

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@marychatte marychatte force-pushed the marychatte/KTOR-5850-HttpRequestRetry-SendCountExceedException-when-max-retries-is-more-than-maxSendCount-of-HttpSend branch from ea1b947 to ce55efc Compare October 27, 2025 16:17
@marychatte marychatte requested a review from osipxd October 27, 2025 18:38

test { client ->
assertEquals(HttpStatusCode.OK, client.get("/").status)
println(counter)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's change this println into an assert 👀

@marychatte marychatte requested a review from bjhham October 29, 2025 09:39
@bjhham bjhham merged commit 97b6970 into release/3.x Oct 29, 2025
17 of 19 checks passed
@bjhham bjhham deleted the marychatte/KTOR-5850-HttpRequestRetry-SendCountExceedException-when-max-retries-is-more-than-maxSendCount-of-HttpSend branch October 29, 2025 10:59
osipxd pushed a commit that referenced this pull request Nov 3, 2025
* KTOR-5850 Fix SendCountExceedException in HttpRequestRetry

* Fix typo
osipxd pushed a commit that referenced this pull request Nov 4, 2025
* KTOR-5850 Fix SendCountExceedException in HttpRequestRetry

* Fix typo
osipxd pushed a commit that referenced this pull request Nov 4, 2025
* KTOR-5850 Fix SendCountExceedException in HttpRequestRetry

* Fix typo
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.

3 participants