Closed aprodhomme-dkt closed 10 months ago
Here you go :)
@jeqo any news on those PRs?
Hi @jeqo and @jjaakola-aiven, thanks for your reviews. I have just took into account your last comments.
Thanks, @aprodhomme-dkt! Let's have a look at #172 to wrap up this contribution 🙌🏽
This PR aims to have clearer responsibilities between the multiple HttpSender implementations. This is required to increase code coverage before introducing a new way to retrieve an access token (see 2nd PR: https://github.com/aiven/http-connector-for-apache-kafka/pull/172)
Changes:
HttpSenderFactory
and provide an implementation according to the configurationAbstractHttpSender
for sending message and sending with retryHttpSender
implementation, even retrieving an access token withAccessTokenHttpSender
HttpSender
implementation creates its ownHttpRequestBuilder
with separate responsibilitiesThis refactor allows to test the HttpRequest that is sent to the API publisher and it covers all scenarios depending on the configuration.