This is an automated email from the ASF dual-hosted git repository.

rzo1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/main by this push:
     new fed59ff233 keep the test HttpAuthenticationMechanism out of the bean 
archive
fed59ff233 is described below

commit fed59ff233f97cfb8613ae970e7ad7c0a891daa8
Author: Richard Zowalla <[email protected]>
AuthorDate: Wed Sep 9 20:44:48 2026 +0200

    keep the test HttpAuthenticationMechanism out of the bean archive
    
    The tests in tomee-security are deployed as a single webapp, so the
    @RememberMe mechanism declared in RememberMeInterceptorCleanSubjectTest was
    picked up by every other test in the module. They all failed to deploy with
    "Multiple HttpAuthenticationMechanism found ... without a @WebServlet
    association".
    
    The class is only used directly by that test and is never resolved through
    CDI, so @Vetoed is enough.
---
 .../tomee/security/cdi/RememberMeInterceptorCleanSubjectTest.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/tomee/tomee-security/src/test/java/org/apache/tomee/security/cdi/RememberMeInterceptorCleanSubjectTest.java
 
b/tomee/tomee-security/src/test/java/org/apache/tomee/security/cdi/RememberMeInterceptorCleanSubjectTest.java
index 221fa0e218..d3ecdd96cb 100644
--- 
a/tomee/tomee-security/src/test/java/org/apache/tomee/security/cdi/RememberMeInterceptorCleanSubjectTest.java
+++ 
b/tomee/tomee-security/src/test/java/org/apache/tomee/security/cdi/RememberMeInterceptorCleanSubjectTest.java
@@ -18,6 +18,7 @@ package org.apache.tomee.security.cdi;
 
 import jakarta.el.ELResolver;
 import jakarta.enterprise.inject.Instance;
+import jakarta.enterprise.inject.Vetoed;
 import jakarta.enterprise.inject.spi.Bean;
 import jakarta.enterprise.inject.spi.BeanManager;
 import jakarta.interceptor.InvocationContext;
@@ -41,6 +42,13 @@ import static org.mockito.Mockito.when;
 
 public class RememberMeInterceptorCleanSubjectTest {
 
+    /**
+     * Only ever used directly, never resolved through CDI. It has to stay out 
of the bean archive:
+     * the tests in this module are deployed as a single webapp, so an 
HttpAuthenticationMechanism
+     * declared here is found by every other test and makes them all fail to 
deploy with
+     * "Multiple HttpAuthenticationMechanism found ... without a @WebServlet 
association".
+     */
+    @Vetoed
     @RememberMe
     public static class RememberMeMechanism implements 
HttpAuthenticationMechanism {
         @Override

Reply via email to