[webbeans-commits] Webbeans SVN: r3348 - tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating and 3 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Wed Jul 29 08:31:44 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-07-29 08:31:43 -0400 (Wed, 29 Jul 2009)
New Revision: 3348

Added:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/PassivationCapableBeanWIthNonPassivatingInitializerInDecorator.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/Static.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaConsumer.java
Removed:
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java
Modified:
   ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java
   tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaProducer.java
   tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
Fix remaining test failures

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java	2009-07-29 11:50:41 UTC (rev 3347)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/AbstractContext.java	2009-07-29 12:31:43 UTC (rev 3348)
@@ -86,12 +86,4 @@
       this.active.set(Boolean.valueOf(active));
    }
 
-   /**
-    * Delegates to a ThreadLocal instance
-    */
-   protected Boolean getActive()
-   {
-      return active.get();
-   }
-
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java	2009-07-29 11:50:41 UTC (rev 3347)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/context/DependentContext.java	2009-07-29 12:31:43 UTC (rev 3348)
@@ -91,15 +91,5 @@
    {
       return true;
    }
-   
-   @Deprecated
-   public <T> void destroyAndRemove(Contextual<T> contextual, T instance)
-   {
-      if (contextual instanceof Contextual)
-      {
-         CreationalContextImpl<T> creationalContext = new CreationalContextImpl<T>(contextual); 
-         contextual.destroy(instance, creationalContext.getCreationalContext(contextual));
-      }
-   }
 
 }

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java	2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java	2009-07-29 12:31:43 UTC (rev 3348)
@@ -51,7 +51,7 @@
    @SpecAssertion(section = "6.6.1", id = "bc")
    public void testManagedBeanWithSerializableDecoratorOK()
    {
-      Set<Bean<CityDecorator>> beans = getBeans(CityDecorator.class);
+      Set<Bean<City>> beans = getBeans(City.class);
       assert !beans.isEmpty();
    }   
    

Deleted: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java	2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java	2009-07-29 12:31:43 UTC (rev 3348)
@@ -1,22 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.passivating.broken18;
-
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.jsr299.tck.DeploymentError;
-import org.jboss.test.audit.annotations.SpecAssertion;
-import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
-import org.testng.annotations.Test;
-
- at Artifact
- at ExpectedDeploymentException(DeploymentError.class)
- at SpecVersion("20090625")
-public class NonSerializableTest extends AbstractJSR299Test
-{
-   @Test(groups = { "contexts", "passivation" })
-   @SpecAssertion(section = "6.6.4", id = "aah")
-   public void testPassivationCapableBeanWithNonPassivatingInitializerInDecoratorFails()
-   {
-      assert false;
-   }
-}

Copied: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/PassivationCapableBeanWIthNonPassivatingInitializerInDecorator.java (from rev 3346, tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/NonSerializableTest.java)
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/PassivationCapableBeanWIthNonPassivatingInitializerInDecorator.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/PassivationCapableBeanWIthNonPassivatingInitializerInDecorator.java	2009-07-29 12:31:43 UTC (rev 3348)
@@ -0,0 +1,23 @@
+package org.jboss.jsr299.tck.tests.context.passivating.broken18;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.jsr299.tck.DeploymentError;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
+import org.testng.annotations.Test;
+
+ at Artifact
+ at ExpectedDeploymentException(DeploymentError.class)
+ at SpecVersion("20090625")
+public class PassivationCapableBeanWIthNonPassivatingInitializerInDecorator extends AbstractJSR299Test
+{
+   @Test(groups = { "contexts", "passivation", "ri-broken" })
+   @SpecAssertion(section = "6.6.4", id = "aah")
+   // WBRI-326
+   public void testPassivationCapableBeanWithNonPassivatingInitializerInDecoratorFails()
+   {
+      assert false;
+   }
+}

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java	2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken18/UnderwaterCity.java	2009-07-29 12:31:43 UTC (rev 3348)
@@ -1,5 +1,8 @@
 package org.jboss.jsr299.tck.tests.context.passivating.broken18;
 
+import javax.enterprise.context.RequestScoped;
+
+ at RequestScoped
 class UnderwaterCity implements CityInterface
 {
 

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java	2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/ProducerFieldLifecycleTest.java	2009-07-29 12:31:43 UTC (rev 3348)
@@ -2,10 +2,10 @@
 
 import javax.enterprise.inject.IllegalProductException;
 
+import org.jboss.jsr299.tck.AbstractJSR299Test;
 import org.jboss.test.audit.annotations.SpecAssertion;
 import org.jboss.test.audit.annotations.SpecAssertions;
 import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.jsr299.tck.AbstractJSR299Test;
 import org.jboss.testharness.impl.packaging.Artifact;
 import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
 import org.testng.annotations.Test;
@@ -32,7 +32,7 @@
    })
    public void testProducerStaticFieldBean()
    {
-      TarantulaConsumer tarantulaConsumer = getInstanceByType(TarantulaConsumer.class);
+      StaticTarantulaConsumer tarantulaConsumer = getInstanceByType(StaticTarantulaConsumer.class);
       assert tarantulaConsumer.getConsumedTarantula().equals(StaticTarantulaProducer.produceTarantula);
    }
 

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/Static.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/Static.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/Static.java	2009-07-29 12:31:43 UTC (rev 3348)
@@ -0,0 +1,22 @@
+package org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+ at Target( { TYPE, METHOD, PARAMETER, FIELD })
+ at Retention(RUNTIME)
+ at Documented
+ at BindingType
+ at interface Static
+{
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/Static.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaConsumer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaConsumer.java	                        (rev 0)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaConsumer.java	2009-07-29 12:31:43 UTC (rev 3348)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.jsr299.tck.tests.implementation.producer.field.lifecycle;
+
+
+/**
+ * This bean contains an injection point for a Tarantula that must be provided
+ * by the container via a (static) producer field.
+ * 
+ * @author David Allen
+ * 
+ */
+public class StaticTarantulaConsumer
+{
+   @Static
+   private Tarantula consumedTarantula;
+
+   public Tarantula getConsumedTarantula()
+   {
+      return consumedTarantula;
+   }
+
+}


Property changes on: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaConsumer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaProducer.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaProducer.java	2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/producer/field/lifecycle/StaticTarantulaProducer.java	2009-07-29 12:31:43 UTC (rev 3348)
@@ -21,6 +21,6 @@
 
 public class StaticTarantulaProducer
 {
-   @Produces @SpiderStereotype public static Tarantula produceTarantula = new Tarantula();
+   @Produces @Static public static Tarantula produceTarantula = new Tarantula();
 
 }

Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml	2009-07-29 11:50:41 UTC (rev 3347)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml	2009-07-29 12:31:43 UTC (rev 3348)
@@ -3379,8 +3379,9 @@
   </section>
 
   <section id="8.1" title="Decorator beans">
-    <assertion id="a">
+    <assertion id="a" testable="false">
       <text>A decorator is a managed bean.</text>
+      <note>Statement of intent</note>
     </assertion>
 
     <assertion id="b">




More information about the weld-commits mailing list