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

Alternative Beans not properly resolved #57

Open
JapuDCret opened this issue Jul 11, 2022 · 0 comments
Open

Alternative Beans not properly resolved #57

JapuDCret opened this issue Jul 11, 2022 · 0 comments

Comments

@JapuDCret
Copy link

JapuDCret commented Jul 11, 2022

Expected result

The alternative Bean with higher priority is chosen.
The injected AuthorizationController is the customCustomOidcTestAuthController (see below).

Observed result

The injected AuthorizationController is the default TestAuthController.
Seen from the debugger:
image
by using

@Inject
AuthorizationController authorizationController;

in the class inheriting fromCucumberQuarkusTest.

Misc

In other test classes this works perfectly fine, just in our cucumber quarkus tests is does not work.

The CustomOidcTestAuthController class:

@Alternative
@Priority(Interceptor.Priority.LIBRARY_BEFORE + 1)
@ApplicationScoped
public class CustomOidcTestAuthController extends TestAuthController {

    @Override
    public boolean isAuthorizationEnabled() {
        return false;
    }
}

(hint: Interceptor.Priority.LIBRARY_BEFORE is 1000, the TestAuthController has 3000)

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

No branches or pull requests

1 participant