Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds HttpSender to aid proper handling of HttpEndpointSupplier #253

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

codefromthecrypt
Copy link
Member

I noticed that implementing constant and dynamic endpoint handing properly is a chore, especially to test it. This adds HttpSender as a second base type. It handles the edge cases so implementors don't have to.

I also added SenderAdapter which helps deal with the Call contract stuff until we can delete it. I also deleted some async tests from okhttp as we don't promise that sort of behavior on a deprecated and unused function. (For example, otel no longer use the async call stuff).

Signed-off-by: Adrian Cole <adrian@tetrate.io>
import static zipkin2.TestObjects.CLIENT_SPAN;

@ExtendWith(MockitoExtension.class)
class HttpSenderTest {
Copy link
Member Author

Choose a reason for hiding this comment

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

tests here were duplicated between urlconnection and okhttp senders. since the behavior is proven here, it is less work to port the resttemplate and webclient senders in boot, as I don't need to copy/paste these tests and burden folks to review them

@codefromthecrypt
Copy link
Member Author

have one more change on top of this that I thought of overnight, but unrelated, so will make another PR

@codefromthecrypt codefromthecrypt merged commit ec4e01c into master Feb 13, 2024
3 checks passed
@codefromthecrypt codefromthecrypt deleted the httpsender branch February 13, 2024 23:46
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.

1 participant