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

QuarkusComponentTest: support test method parameter injection #38379

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Jan 24, 2024

  • params annotated with SkipInject are never injected

@mkouba mkouba force-pushed the component-test-method-param-inject branch from 3823a0f to 40b7514 Compare January 25, 2024 10:42
@mkouba mkouba force-pushed the component-test-method-param-inject branch from 40b7514 to 8507b22 Compare January 25, 2024 10:42
@mkouba mkouba marked this pull request as ready for review January 25, 2024 10:43
@mkouba
Copy link
Contributor Author

mkouba commented Jan 25, 2024

@manovotn I know that you have some experience with test method param injection from weld-junit. So our strategy is to resolve any param for which a matching bean exists and is not annotated with @io.quarkus.test.component.SkipInject. The built-in org.junit.jupiter.api.TestInfo is ignored automatically. WDYT?

Copy link

github-actions bot commented Jan 25, 2024

🙈 The PR is closed and the preview is expired.

Copy link
Contributor

@Ladicek Ladicek left a comment

Choose a reason for hiding this comment

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

LGTM, just a few suggestions that would improve documentation somewhat IMHO.

@mkouba mkouba force-pushed the component-test-method-param-inject branch from 1cf5af6 to 85bd285 Compare January 25, 2024 11:54
@mkouba mkouba force-pushed the component-test-method-param-inject branch from 85bd285 to 3cc46ef Compare January 25, 2024 15:43
@mkouba mkouba requested a review from manovotn January 25, 2024 15:43

This comment has been minimized.

Copy link
Contributor

@manovotn manovotn left a comment

Choose a reason for hiding this comment

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

LGTM now!

@Ladicek
Copy link
Contributor

Ladicek commented Jan 26, 2024

LGTM otherwise.

- params annotated with SkipInject are never injected

Co-authored-by: Ladislav Thon <[email protected]>
@mkouba mkouba force-pushed the component-test-method-param-inject branch from 3cc46ef to f853e4c Compare January 26, 2024 09:21
@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 26, 2024

This comment has been minimized.

Copy link

quarkus-bot bot commented Jan 26, 2024

✔️ 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.

You can consult the Develocity build scans.

@mkouba mkouba merged commit ab22e88 into quarkusio:main Jan 26, 2024
54 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.9 - main milestone Jan 26, 2024
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants