Author: pete.muir(a)jboss.org
Date: 2009-09-15 13:29:59 -0400 (Tue, 15 Sep 2009)
New Revision: 3672
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/ApplicationContextSharedTest.java
Removed:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextSharedBetweenTimeoutInvocationTest.java
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java
tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
Log:
Some improvements
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java 2009-09-15
15:39:18 UTC (rev 3671)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java 2009-09-15
17:29:59 UTC (rev 3672)
@@ -22,7 +22,7 @@
@Resource(destination=WarArtifactDescriptor.WEB_XML_DESTINATION,
source="web.xml"),
@Resource(destination="SimplePage.html", source="SimplePage.html")
})
-@SpecVersion(spec = "jsr299", version="20090625")
+@SpecVersion(spec = "cdi", version="1.0.20090625")
public class ApplicationContextTest extends AbstractJSR299Test
{
Copied:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/ApplicationContextSharedTest.java
(from rev 3671,
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextSharedBetweenTimeoutInvocationTest.java)
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/ApplicationContextSharedTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/ApplicationContextSharedTest.java 2009-09-15
17:29:59 UTC (rev 3672)
@@ -0,0 +1,36 @@
+package org.jboss.jsr299.tck.tests.context.application.ejb;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+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.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Packaging;
+import org.jboss.testharness.impl.packaging.PackagingType;
+import org.testng.annotations.Test;
+
+/**
+ * EJB and related tests with the built-in application context.
+ *
+ * @author David Allen
+ */
+@Artifact
+@IntegrationTest
+(a)Packaging(PackagingType.EAR)
+@SpecVersion(spec="cdi", version="1.0.20090625")
+public class ApplicationContextSharedTest extends AbstractJSR299Test
+{
+
+ @Test(groups = { "contexts", "ejb3", "integration",
"rewrite" })
+ // TODO Needs to test *all* uses of app context are shared, not each type
individually
+ @SpecAssertion(section = "6.7.3", id = "e")
+ public void testApplicationContextShared() throws Exception
+ {
+ FMS flightManagementSystem = getInstanceByType(FMS.class);
+ flightManagementSystem.climb();
+ flightManagementSystem.descend();
+ Thread.sleep(250);
+ assert flightManagementSystem.isSameBean();
+ }
+
+}
Property changes on:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/ApplicationContextSharedTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextSharedBetweenTimeoutInvocationTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextSharedBetweenTimeoutInvocationTest.java 2009-09-15
15:39:18 UTC (rev 3671)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextSharedBetweenTimeoutInvocationTest.java 2009-09-15
17:29:59 UTC (rev 3672)
@@ -1,35 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.application.ejb;
-
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-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.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Packaging;
-import org.jboss.testharness.impl.packaging.PackagingType;
-import org.testng.annotations.Test;
-
-/**
- * EJB and related tests with the built-in application context.
- *
- * @author David Allen
- */
-@Artifact
-@IntegrationTest
-(a)Packaging(PackagingType.EAR)
-@SpecVersion(spec="cdi", version="1.0.20090625")
-public class EJBApplicationContextSharedBetweenTimeoutInvocationTest extends
AbstractJSR299Test
-{
-
- @Test(groups = { "contexts", "ejb3", "integration" })
- @SpecAssertion(section = "6.7.3", id = "ef")
- public void testApplicationContextSharedBetweenEJBTimeoutInvocations() throws
Exception
- {
- FMS flightManagementSystem = getInstanceByType(FMS.class);
- flightManagementSystem.climb();
- flightManagementSystem.descend();
- Thread.sleep(250);
- assert flightManagementSystem.isSameBean();
- }
-
-}
Modified: tck/trunk/impl/src/main/resources/tck-audit-cdi.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-09-15 15:39:18 UTC (rev
3671)
+++ tck/trunk/impl/src/main/resources/tck-audit-cdi.xml 2009-09-15 17:29:59 UTC (rev
3672)
@@ -3232,14 +3232,35 @@
</section>
<section id="6.7.3" title="Application context lifecycle">
- <assertion id="aa">
- <text>The application scope is active during the |service()| method of any
servlet in the web application ~, during the |doFilter()| method of any servlet filter and
when the container calls any |ServletContextListener|, |HttpSessionListener|,
|AsyncListener| or |ServletRequestListener|.~</text>
- </assertion>
+ <group>
+ <text>The application scope is active during the |service()| method of any
servlet in the web application, during the |doFilter()| method of any servlet filter and
when the container calls any |ServletContextListener|, |HttpSessionListener|,
|AsyncListener| or |ServletRequestListener|.</text>
+ <assertion id="aa">
+ <text>Check service method</text>
+ </assertion>
- <assertion id="ab">
- <text>The application scope is active during ~the |service()| method of any
servlet in the web application, during~ the |doFilter()| method of any servlet filter and
when the container calls any |ServletContextListener|, |HttpSessionListener|,
|AsyncListener| or |ServletRequestListener|.~</text>
- </assertion>
+ <assertion id="ab">
+ <text>Check filter.</text>
+ </assertion>
+
+ <assertion id="ac">
+ <text>Check |ServletContextListener|.</text>
+ </assertion>
+
+ <assertion id="ad">
+ <text>Check |HttpSessionListener|</text>
+ </assertion>
+
+ <assertion id="ae">
+ <text>Check |AsyncListener|</text>
+ </assertion>
+
+ <assertion id="af">
+ <text>Check |ServletRequestListener|</text>
+ </assertion>
+
+ </group>
+
<assertion id="b">
<text>The application scope is active during any Java EE web service
invocation.</text>
</assertion>
@@ -3248,61 +3269,52 @@
<text>The application scope is active during any asynchronous observer method
notification.</text>
</assertion>
- <assertion id="da">
- <text>The application scope is also active during any remote method
invocation of any EJB~, during any asynchronous method invocation of any EJB, during any
call to an EJB timeout method and during message delivery to any EJB message-driven
bean.</text>
- </assertion>
+ <group>
+ <text>The application scope is also active during any remote method
invocation of any EJB, during any asynchronous method invocation of any EJB, during any
call to an EJB timeout method and during message delivery to any EJB message-driven
bean.</text>
+ <assertion id="da">
+ <text>Test remote method invocation</text>
+ </assertion>
- <assertion id="db">
- <text>The application scope is also active ~during any remote method
invocation of any EJB~, during any asynchronous method invocation of any EJB~, during any
call to an EJB timeout method and during message delivery to any EJB message-driven
bean.~</text>
- </assertion>
+ <assertion id="db">
+ <text> Test asynchronous method invocation</text>
+ </assertion>
- <assertion id="dc">
- <text>The application scope is also active ~during any remote method
invocation of any EJB, during any asynchronous method invocation of any EJB,~ during any
call to an EJB timeout method~ and during message delivery to any EJB message-driven
bean.~</text>
- </assertion>
+ <assertion id="dc">
+ <text>Test EJB timeout method</text>
+ </assertion>
- <assertion id="dd">
- <text>The application scope is also active ~during any remote method
invocation of any EJB, during any asynchronous method invocation of any EJB, during any
call to an EJB timeout method and~ during message delivery to any EJB message-driven
bean.</text>
- </assertion>
-
- <assertion id="de">
+ <assertion id="dd">
+ <text>Test message delivery to any EJB message-driven bean.</text>
+ </assertion>
+ </group>
+
+ <group>
<text>The application scope is active during any message delivery to a
|MessageListener| for a JMS topic or queue obtained from the Java EE component
environment.</text>
- </assertion>
+ <assertion id="de">
+ <text>Test JMS topic</text>
+ </assertion>
+ <assertion id="df">
+ <text>Test JMS queue</text>
+ </assertion>
+ </group>
- <assertion id="df">
+ <group>
<text>The application scope is active when the disposer method or
|@PreDestroy| callback of any bean with any normal scope other than |@ApplicationScoped|
is called.</text>
- </assertion>
+ <assertion id="dg">
+ <text>Test disposer method</text>
+ </assertion>
+ <assertion id="dh">
+ <text>Test |@PreDestroy| method</text>
+ </assertion>
+ </group>
- <assertion id="ea">
- <text>The application context is shared between all servlet requests~,
asynchronous observer method notifications, web service invocations, EJB remote method
invocations, EJB asynchronous method invocations, EJB timeouts and message deliveries to
message driven beans ~that execute within the same application.</text>
+ <assertion id="e">
+ <text>The application context is shared between all servlet requests,
asynchronous observer method notifications, web service invocations, EJB remote method
invocations, EJB asynchronous method invocations, EJB timeouts and message deliveries to
message driven beans that execute within the same application.</text>
+ <note>A single test needs check *all* these request types</note>
</assertion>
- <assertion id="eb">
- <text>The application context is shared between all ~servlet requests,~
asynchronous observer method notifications~, web service invocations, EJB remote method
invocations, EJB asynchronous method invocations, EJB timeouts and message deliveries to
message driven beans ~that execute within the same application.</text>
- </assertion>
-
- <assertion id="ec">
- <text>The application context is shared between all ~servlet requests,
asynchronous observer method notifications,~ web service invocations~, EJB remote method
invocations, EJB asynchronous method invocations, EJB timeouts and message deliveries to
message driven beans ~that execute within the same application~.</text>
- </assertion>
-
- <assertion id="ed">
- <text>The application context is shared between all ~servlet requests,
asynchronous observer method notifications, web service invocations,~ EJB remote method
invocations~, EJB asynchronous method invocations, EJB timeouts and message deliveries to
message driven beans ~that execute within the same application~.</text>
- </assertion>
-
- <assertion id="ee">
- <text>The application context is shared between all ~servlet requests,
asynchronous observer method notifications, web service invocations, EJB remote method
invocations,~ EJB asynchronous method invocations~, EJB timeouts and message deliveries to
message driven beans ~that execute within the same application.</text>
- </assertion>
-
- <assertion id="ef">
- <text>The application context is shared between all ~servlet requests,
asynchronous observer method notifications, web service invocations, EJB remote method
invocations, EJB asynchronous method invocations,~ EJB timeouts ~and message deliveries to
message driven beans ~that execute within the same application.</text>
- </assertion>
-
- <assertion id="eg">
- <text>The application context is shared between all ~servlet requests,
asynchronous observer method notifications, web service invocations, EJB remote method
invocations, EJB asynchronous method invocations, EJB timeouts and~ message deliveries to
message driven beans ~that execute within the same application.</text>
- </assertion>
-
<assertion id="f">
- <text>The application context is destroyed when the application
-is undeployed.</text>
+ <text>The application context is destroyed when the application is
undeployed.</text>
</assertion>
</section>