-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Make URL inherit TestHTTPEndpoint from class level #46157
Make URL inherit TestHTTPEndpoint from class level #46157
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
8c4075e
to
f60ff81
Compare
Seems reasonable! |
f60ff81
to
c75ead2
Compare
Status for workflow
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I am actually going to revert this because it can cause issues like #46336, meaning it can break existing tests and users have no way to recover. Sorry I didn't anticipate this earlier |
Sure, no problem. I didn't either 😔. A simple type validation should fix it (only inject URL fields). Will see if I can do it this weekend (unless someone is willing to do it earlier 🙃) PS: during my testing I noticed that injection happens once for each test, not necessarily once per class (eg. 2 times for 2 tests in the same class). Is this expected or should I open an issue? It feels inefficient. |
I know, but that is unfortunately not enough. There could very well be tests in the wild that use URL (or String) as a field that is set by the test itself. Those cases would now break. |
Closes #34935
Continuation of #35095
Functionality:
If a Test Class is annotated with
@TestHTTPEndpoint
then all URL fields inherit it's configuration.If URL is also annotated, URL's annotation takes precedence.
Local tests (Windows):
./mvnw "-Dquickly"
passed successfully../mvnw test -f integration-tests/main/
passed successfullyQuarkus CI
GitHub action, on local repo, passed successfully (https://github.com/gian1200/quarkus/actions/runs/13360530930)Additional notes:
I couldn't find the tests for original functionality, so I included both (new and original).
I reused some resources/endpoints. Not sure if that's acceptable/expected or not (hopefully it doesn't make other tests fail)