Author: pete.muir(a)jboss.org
Date: 2010-12-07 12:26:29 -0500 (Tue, 07 Dec 2010)
New Revision: 7107
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java
Log:
CDITCK-181
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2010-12-07
17:22:49 UTC (rev 7106)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/EventTest.java 2010-12-07
17:26:29 UTC (rev 7107)
@@ -19,6 +19,7 @@
import java.util.ArrayList;
import java.util.Set;
+import javax.enterprise.context.spi.Context;
import javax.enterprise.event.TransactionPhase;
import javax.enterprise.inject.spi.ObserverMethod;
@@ -64,9 +65,10 @@
})
public void testStaticObserverMethodInvoked()
{
+ Context requestContext =
getCurrentConfiguration().getContexts().getRequestContext();
try
{
-
getCurrentConfiguration().getContexts().setInactive(getCurrentConfiguration().getContexts().getRequestContext());
+ getCurrentConfiguration().getContexts().setInactive(requestContext);
StaticObserver.reset();
getCurrentManager().fireEvent(new Delivery());
assert StaticObserver.isDeliveryReceived();
@@ -74,7 +76,7 @@
}
finally
{
-
getCurrentConfiguration().getContexts().setActive(getCurrentConfiguration().getContexts().getRequestContext());
+ getCurrentConfiguration().getContexts().setActive(requestContext);
}
}
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java
===================================================================
---
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java 2010-12-07
17:22:49 UTC (rev 7106)
+++
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/ClientProxyTest.java 2010-12-07
17:26:29 UTC (rev 7107)
@@ -19,8 +19,7 @@
import java.io.IOException;
import javax.enterprise.context.ContextNotActiveException;
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.context.spi.Context;
import org.jboss.jsr299.tck.AbstractJSR299Test;
import org.jboss.test.audit.annotations.SpecAssertion;
@@ -70,7 +69,8 @@
public void testInactiveScope() throws Exception
{
assert getCurrentConfiguration().getContexts().getRequestContext().isActive();
- setContextInactive(getCurrentConfiguration().getContexts().getRequestContext());
+ Context ctx = getCurrentConfiguration().getContexts().getRequestContext();
+ setContextInactive(ctx);
assert !getCurrentConfiguration().getContexts().getRequestContext().isActive();
try
{
@@ -79,7 +79,7 @@
finally
{
// need to set request scope active again, some other tests will fail otherwise
- setContextActive(getCurrentConfiguration().getContexts().getRequestContext());
+ setContextActive(ctx);
}
}
}
Show replies by date