-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
QuarkusComponentTest: refactorings and API changes #35768
Conversation
mkouba
commented
Sep 6, 2023
- determine the test phase when the container is started from the TestInstance#value()
- introduce the QuarkusComponentTestExtensionBuilder to create immutable extension instance when programmatic API is used
- TestConfigProperty can be declared on test methods
It's a DRAFT because the docs need to be updated as well. This is a breaking change (the programmatic API only) but it should be ok since it's an experimental feature. I will add a note to the migration guide. |
...it5-component/src/main/java/io/quarkus/test/component/QuarkusComponentTestConfiguration.java
Outdated
Show resolved
Hide resolved
test-framework/junit5-component/src/main/java/io/quarkus/test/component/TestConfigProperty.java
Outdated
Show resolved
Hide resolved
.../junit5-component/src/main/java/io/quarkus/test/component/QuarkusComponentTestExtension.java
Outdated
Show resolved
Hide resolved
If I understand it correctly, we will run the entire EDIT: otherwise LGTM, and I like how the test configuration is externalized to an extra class. |
fae399e
to
1eebd1e
Compare
Well, if we allow users to change the config per test method then it might make sense to restart the whole thing. I mean we don't support things like |
1eebd1e
to
d37cc2a
Compare
It seems to work (with some tweaks here and there ;-)... |
- determine the test phase in which the container should be started from the TestInstance lifecycle - introduce the QuarkusComponentTestExtensionBuilder to create immutable extension instance when programmatic API is used - TestConfigProperty can be declared on test methods Co-authored-by: Ladislav Thon <ladicek@gmail.com>
d37cc2a
to
1a2de65
Compare
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.
Nice!
🙈 The PR is closed and the preview is expired. |
This comment has been minimized.
This comment has been minimized.
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. |
FTR the migration guide: https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.4#component-testing |