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

Do not greedily inject @ParameterizedTest; instead treat is as explicit param. injection #170

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

manovotn
Copy link
Collaborator

Fixes #169

This is one of the options that I thought of as a solution - we will now avoid injecting into such test unless there is an explicit CDI qualifier at any given parameter.
Note that junit is very simple in its approach and always considers the very first arg. to be the parameterized one (or first n params if you have more) and there is nothing we can do about that. This means that users can still try to have first param resolved by Weld (by adding qualifier) and have a conflict of multiple extensions competing for that given parameter.

The other option I had in mind was simply not injecting into @ParameterizedTest at all unless annotated with explicit param injection. I don't mind either, I just thought the one I proposed here is a tad bit user friendlier.

@manovotn manovotn requested a review from mkouba February 21, 2024 14:01
@manovotn manovotn merged commit 12d8a63 into weld:master Feb 21, 2024
2 checks passed
@manovotn manovotn deleted the issue169 branch February 21, 2024 16:35
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.

Problem with @ParameterizedTest with @EnableAutoWeld, @MethodSource
2 participants