You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2023/01/26 21:00:23 UTC

[openwebbeans] branch main updated (43cbd4209 -> edcd0d3b3)

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

struberg pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git


    from 43cbd4209 OWB-1417 misleading test
     new dbe443be0 OWB-1417 disable more invalid tests
     new edcd0d3b3 OWB-1417 improve Alternative Sterotype handling

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/webbeans/util/WebBeansUtil.java     | 11 +++--
 webbeans-tck/standalone-suite.xml                  | 18 +++++++++
 webbeans-tck/testng-dev.xml                        | 47 +++++++++++-----------
 3 files changed, 50 insertions(+), 26 deletions(-)


[openwebbeans] 01/02: OWB-1417 disable more invalid tests

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit dbe443be0ea0fd4bd0993e43e112ad47538e61ca
Author: Mark Struberg <st...@apache.org>
AuthorDate: Thu Jan 26 20:52:17 2023 +0100

    OWB-1417 disable more invalid tests
---
 webbeans-tck/standalone-suite.xml | 18 ++++++++++++++++++
 webbeans-tck/testng-dev.xml       |  4 ++--
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/webbeans-tck/standalone-suite.xml b/webbeans-tck/standalone-suite.xml
index 515d22b8f..5492700ac 100644
--- a/webbeans-tck/standalone-suite.xml
+++ b/webbeans-tck/standalone-suite.xml
@@ -106,6 +106,24 @@
                 </methods>
             </class>
 
+            <!--
+                Illegal code as they do call reateInjectionTarget(null); and not on the real bean.
+            -->
+            <class name="org.jboss.cdi.tck.tests.full.extensions.alternative.metadata.interceptor.AlternativeMetadataInterceptorInjectionTargetTest" >
+                <methods>
+                    <exclude name=".*"/>
+                </methods>
+            </class>
+
+            <!--
+                Test wrongly assumes that Annotated must implement equals().
+            -->
+            <class name="org.jboss.cdi.tck.tests.full.context.passivating.dependency.builtin.BuiltinBeanPassivationDependencyTest" >
+                <methods>
+                    <exclude name="testInjectionPoint"/>
+                </methods>
+            </class>
+
 
 
             <!-- Tests broken in the CDI-2.0 TCK: -->
diff --git a/webbeans-tck/testng-dev.xml b/webbeans-tck/testng-dev.xml
index e2e94ddf8..c97b98bd7 100644
--- a/webbeans-tck/testng-dev.xml
+++ b/webbeans-tck/testng-dev.xml
@@ -18,9 +18,9 @@
 <suite name="JSR-346-TCK" verbose="2" configfailurepolicy="continue">
   <test name="JSR-346 TCK">
     <classes>
-          <class name="org.jboss.cdi.tck.tests.full.extensions.beanDiscovery.event.ordering.LifecycleEventOrderingTest" >
+          <class name="org.jboss.cdi.tck.tests.full.alternative.selection.stereotype.SelectedBeanWithUnselectedStereotypeTest" >
             <methods>
-              <include name="testEventsWereFiredInCorrectOrderForManagedBean"/>
+              <include name=".*"/>
             </methods>
           </class>
 


[openwebbeans] 02/02: OWB-1417 improve Alternative Sterotype handling

Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit edcd0d3b353d37601c3b9d64741acaa3cc8b839d
Author: Mark Struberg <st...@apache.org>
AuthorDate: Thu Jan 26 21:59:51 2023 +0100

    OWB-1417 improve Alternative Sterotype handling
---
 .../org/apache/webbeans/util/WebBeansUtil.java     | 11 +++--
 webbeans-tck/testng-dev.xml                        | 47 +++++++++++-----------
 2 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java b/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
index 73781bd41..911b6848a 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
@@ -902,14 +902,19 @@ public final class WebBeansUtil
         }
         if (stereotypes != null && !stereotypes.isEmpty())
         {
+            boolean hasPriority = at.getAnnotation(Priority.class) != null;
+            boolean hasStereotypeWithPriority = false;
             for (Class<? extends Annotation> stereotype : stereotypes)
             {
-                if (alternativesManager.isAlternativeStereotype(stereotype) ||
-                    at.getAnnotation(Priority.class) != null || isStereotypeWithPriority(stereotype, stereotypes))
+                if (isStereotypeWithPriority(stereotype, stereotypes))
                 {
-                    return true;
+                    hasStereotypeWithPriority = true;
                 }
             }
+            if (hasPriority || hasStereotypeWithPriority)
+            {
+                return true;
+            }
 
         }
         return false;
diff --git a/webbeans-tck/testng-dev.xml b/webbeans-tck/testng-dev.xml
index c97b98bd7..4b4aa1ef5 100644
--- a/webbeans-tck/testng-dev.xml
+++ b/webbeans-tck/testng-dev.xml
@@ -16,29 +16,30 @@
     License.
 -->
 <suite name="JSR-346-TCK" verbose="2" configfailurepolicy="continue">
-  <test name="JSR-346 TCK">
-    <classes>
-          <class name="org.jboss.cdi.tck.tests.full.alternative.selection.stereotype.SelectedBeanWithUnselectedStereotypeTest" >
-            <methods>
-              <include name=".*"/>
-            </methods>
-          </class>
+    <test name="JSR-346 TCK">
 
-      <!--
+        <classes>
+            <class name="org.jboss.cdi.tck.tests.definition.stereotype.priority.inherited.StereotypeInheritedPriorityTest" >
+                <methods>
+                    <include name=".*"/>
+                </methods>
+            </class>
 
-      <class name="org.jboss.cdi.tck.tests.event.parameterized.ParameterizedEventTest" />
-      <class name="org.jboss.cdi.tck.tests.event.fires.FireEventTest" />
-      -->
-    </classes>
-    <groups>
-      <run>
-        <exclude name="integration"/>
-        <exclude name="javaee-full"/>
-      </run>
-    </groups>
-  </test>
-  <listeners>
-    <listener class-name="org.jboss.cdi.tck.impl.testng.SingleTestClassMethodInterceptor"/>
-    <listener class-name="org.jboss.cdi.tck.impl.testng.ProgressLoggingTestListener"/>
-  </listeners>
+            <!--
+
+            <class name="org.jboss.cdi.tck.tests.event.parameterized.ParameterizedEventTest" />
+            <class name="org.jboss.cdi.tck.tests.event.fires.FireEventTest" />
+            -->
+        </classes>
+        <groups>
+            <run>
+                <exclude name="integration"/>
+                <exclude name="javaee-full"/>
+            </run>
+        </groups>
+    </test>
+    <listeners>
+        <listener class-name="org.jboss.cdi.tck.impl.testng.SingleTestClassMethodInterceptor"/>
+        <listener class-name="org.jboss.cdi.tck.impl.testng.ProgressLoggingTestListener"/>
+    </listeners>
 </suite>