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

jetty-httpclient-12: send method must pass along implemented response listeners #12326

Conversation

stevenschlansker
Copy link
Contributor

The super HttpRequest.send call says:

The listener passed to this method may implement not only Response.CompleteListener
but also other response listener interfaces, and all the events implemented will be notified.

The current implementation passes through a lambda that implements CompleteListener only, and does not delegate-in-scope to any other callback methods you might provide

@stevenschlansker stevenschlansker requested a review from a team as a code owner September 25, 2024 00:23
@stevenschlansker stevenschlansker force-pushed the jetty-httpclient-12-listener-interfaces branch 5 times, most recently from f796e4c to 657d6e4 Compare September 25, 2024 01:44
@stevenschlansker stevenschlansker force-pushed the jetty-httpclient-12-listener-interfaces branch 3 times, most recently from 84c0a4f to 24bb28e Compare September 27, 2024 20:27
@breedx-splk
Copy link
Contributor

@stevenschlansker give it a ./gradlew spotlessApply as well. 😁

@stevenschlansker stevenschlansker force-pushed the jetty-httpclient-12-listener-interfaces branch 2 times, most recently from af5b622 to e8901ca Compare September 27, 2024 21:37
@laurit
Copy link
Contributor

laurit commented Sep 30, 2024

could you also add a test

@stevenschlansker
Copy link
Contributor Author

could you also add a test

I did look into this, but the current testing structure is quite rigid with stacked superclasses and I am not sure exactly how to extend it since the tests are expected to apply to many different libraries. I'll give it a go...

… listeners

The super HttpRequest.send call says:

> The listener passed to this method may implement not only Response.CompleteListener
> but also other response listener interfaces, and all the events implemented will be notified.

The current implementation passes through a lambda that implements CompleteListener only, and
does not delegate-in-scope to any other callback methods you might provide
@stevenschlansker stevenschlansker force-pushed the jetty-httpclient-12-listener-interfaces branch from e8901ca to d8a201a Compare September 30, 2024 21:50
@stevenschlansker
Copy link
Contributor Author

Ok, I tried to add a new test case that checks that listeners are run.

@laurit
Copy link
Contributor

laurit commented Oct 1, 2024

@stevenschlansker I slightly modified the test to also verify that context is propagated to the listener

@trask trask merged commit b003541 into open-telemetry:main Oct 1, 2024
56 checks passed
@stevenschlansker stevenschlansker deleted the jetty-httpclient-12-listener-interfaces branch October 2, 2024 16:31
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.

4 participants