Author: pete.muir(a)jboss.org
Date: 2010-01-22 11:38:38 -0500 (Fri, 22 Jan 2010)
New Revision: 5589
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ProcessAnnotatedTypeObserver.java
Log:
port r5422 to trunk
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2010-01-22
16:38:01 UTC (rev 5588)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/dependent/DependentContextTest.java 2010-01-22
16:38:38 UTC (rev 5589)
@@ -189,9 +189,8 @@
})
public void testContextIsActiveWhenInvokingProducerMethod()
{
- Bean<Tarantula> tarantulaBean = getBeans(Tarantula.class).iterator().next();
- CreationalContext<Tarantula> creationalContext =
getCurrentManager().createCreationalContext(tarantulaBean);
- Tarantula tarantula = tarantulaBean.create(creationalContext);
+ SpiderProducer.reset();
+ Tarantula tarantula = getInstanceByType(Tarantula.class,PET_LITERAL);
assert tarantula != null;
assert SpiderProducer.isDependentContextActive();
SpiderProducer.reset();
@@ -205,6 +204,7 @@
Tarantula.reset();
getInstanceByType(Tarantula.class,TAME_LITERAL);
assert Tarantula.isDependentContextActive();
+ SpiderProducer.reset();
}
@Test(groups = { "contexts", "disposalMethod" })
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ProcessAnnotatedTypeObserver.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ProcessAnnotatedTypeObserver.java 2010-01-22
16:38:01 UTC (rev 5588)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ProcessAnnotatedTypeObserver.java 2010-01-22
16:38:38 UTC (rev 5589)
@@ -17,6 +17,7 @@
package org.jboss.jsr299.tck.tests.lookup.injection.non.contextual;
import javax.enterprise.event.Observes;
+import javax.enterprise.inject.spi.BeforeShutdown;
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.ProcessAnnotatedType;
@@ -29,6 +30,16 @@
private static ProcessAnnotatedType<TestTagHandler> tagHandlerEvent = null;
private static ProcessAnnotatedType<Farm> jsfManagedBeanEvent = null;
+ public void cleanup(@Observes BeforeShutdown shutdown)
+ {
+ servletEvent = null;
+ listenerEvent = null;
+ filterEvent = null;
+ tagLibraryListenerEvent = null;
+ tagHandlerEvent = null;
+ jsfManagedBeanEvent = null;
+ }
+
public void observeServlet(@Observes ProcessAnnotatedType<TestServlet> event) {
servletEvent = event;
}
Show replies by date