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

Feat add a test case in AbstractHttpClientTest.java #12924

Merged
merged 9 commits into from
Jan 13, 2025

Conversation

shalk
Copy link
Contributor

@shalk shalk commented Dec 19, 2024

BackGroup:
In origin jaxrs-client 2.0-testing groovy file there is a test case relate to http test.

The test case is client error , send http request with path /client-error to server and return 400 http status code.

Laurit advise to add this case for all http test.

cc @trask

@shalk shalk marked this pull request as ready for review December 26, 2024 12:41
@shalk shalk requested a review from a team as a code owner December 26, 2024 12:41
@@ -131,6 +133,7 @@ default Builder withDefaults() {
.setTestCallbackWithParent(true)
.setTestErrorWithCallback(true)
.setTestNonStandardHttpMethod(true)
.setTestClientError(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

if a test is always enabled then there is no need to add an option to disable it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@@ -1029,6 +1029,34 @@ void spanEndsAfterHeadersReceived() throws Exception {
});
}

@Test
void requestClientError() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is essentially a copy of errorSpan test, perhaps it would make sense to parameterize that test instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@trask
Copy link
Member

trask commented Jan 10, 2025

hi @shalk! can you update the PR description to include the motivation for this test? thanks

@shalk shalk changed the title Feat add testerror Feat add a test case in AbstractHttpClientTest.java Jan 13, 2025
@trask trask merged commit 8c0aafb into open-telemetry:main Jan 13, 2025
58 checks passed
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