Author: shane.bryzak(a)jboss.com
Date: 2009-08-04 20:43:53 -0400 (Tue, 04 Aug 2009)
New Revision: 3400
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Wheat.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/WheatProducer.java
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/broken19/NonPassivationCapableProducerMethodTest.java
tck/trunk/impl/src/main/resources/tck-audit.xml
Log:
passivating context tests, test groupings in tck-audit
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-08-04
16:57:40 UTC (rev 3399)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/PassivatingContextTest.java 2009-08-05
00:43:53 UTC (rev 3400)
@@ -63,6 +63,14 @@
assert !beans.isEmpty();
}
+ @Test(groups = { "contexts", "passivation" })
+ @SpecAssertion(section = "6.6.1", id = "da")
+ public void testPassivationCapableProducerFieldIsOK()
+ {
+ Set<Bean<Wheat>> beans = getBeans(Wheat.class);
+ assert !beans.isEmpty();
+ }
+
@Test @SpecAssertion(section="6.6.2", id = "c")
public void testInjectionOfDependentPrimitiveProductIntoNormalBean()
{
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Wheat.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Wheat.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/Wheat.java 2009-08-05
00:43:53 UTC (rev 3400)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.context.passivating;
+
+import java.io.Serializable;
+
+@SuppressWarnings("serial")
+class Wheat implements Serializable
+{
+
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/WheatProducer.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/WheatProducer.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/WheatProducer.java 2009-08-05
00:43:53 UTC (rev 3400)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.context.passivating;
+
+import javax.enterprise.context.SessionScoped;
+import javax.enterprise.inject.Produces;
+
+public class WheatProducer
+{
+ public @Produces @SessionScoped Wheat wheat = new Wheat();
+}
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken19/NonPassivationCapableProducerMethodTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken19/NonPassivationCapableProducerMethodTest.java 2009-08-04
16:57:40 UTC (rev 3399)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/passivating/broken19/NonPassivationCapableProducerMethodTest.java 2009-08-05
00:43:53 UTC (rev 3400)
@@ -2,6 +2,7 @@
import org.jboss.jsr299.tck.DeploymentError;
import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecAssertions;
import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
@@ -20,7 +21,10 @@
public class NonPassivationCapableProducerMethodTest
{
@Test(groups = { "passivation", "ri-broken" })
- @SpecAssertion(section = "6.6.1", id = "cb")
+ @SpecAssertions({
+ @SpecAssertion(section = "6.6.1", id = "cb"),
+ @SpecAssertion(section = "6.6.4", id = "ca")
+ })
public void testNonPassivationCapableProducerMethodNotOk()
{
assert false;
Modified: tck/trunk/impl/src/main/resources/tck-audit.xml
===================================================================
--- tck/trunk/impl/src/main/resources/tck-audit.xml 2009-08-04 16:57:40 UTC (rev 3399)
+++ tck/trunk/impl/src/main/resources/tck-audit.xml 2009-08-05 00:43:53 UTC (rev 3400)
@@ -2639,15 +2639,19 @@
</section>
<section id="6.4.2" title="Dependent object destruction">
-
- <assertion id="aaaa">
- <text>The container must ensure that all dependent objects of a
non-contextual instance of a bean ~or other Java EE component~ class are destroyed when
the instance is destroyed by the container.</text>
- </assertion>
-
- <assertion id="aaab">
- <text>The container must ensure that all dependent objects of a
non-contextual instance of a ~bean~ or other Java EE component class are destroyed when
the instance is destroyed by the container.</text>
- </assertion>
+
+ <group>
+ <text>The container must ensure that all dependent objects of a
non-contextual instance of a bean or other Java EE component class are destroyed when the
instance is destroyed by the container.</text>
+
+ <assertion id="aaaa">
+ <text>Test with a managed bean.</text>
+ </assertion>
+ <assertion id="aaab">
+ <text>Test with a Java EE component.</text>
+ </assertion>
+ </group>
+
<assertion id="bbb">
<text>The container must ensure that all |@Dependent| scoped contextual
instances injected into method parameters of an observer method of any container lifecycle
event, as defined in Section 11.5, "Container lifecycle events", are destroyed
after all observers of the |BeforeShutdown| event complete.</text>
</assertion>
@@ -2832,10 +2836,18 @@
</assertion>
</section>
- <section id="6.6.3" title="Passivating scopes">
- <assertion id="a">
- <text>A passivating scope requires that beans with the scope are passivation
capable, and implementations of |Contextual| passed to any context object for the scope
are passivation capable.</text>
- </assertion>
+ <section id="6.6.3" title="Passivating scopes">
+ <group>
+ <text>A passivating scope requires that beans with the scope are passivation
capable, and implementations of |Contextual| passed to any context object for the scope
are passivation capable.</text>
+
+ <assertion id="a">
+ <text>Test that a bean with the scope is passivation capable.</text>
+ </assertion>
+
+ <assertion id="b">
+ <text>Test that an implementation of |Contextual| passed to the context
object for the scope is passivation capable.</text>
+ </assertion>
+ </group>
<assertion id="b">
<text>Passivating scopes must be explicitly declared
|(a)ScopeType(passivating=true)|.</text>
@@ -3031,34 +3043,42 @@
<assertion id="e">
<text>The request scope is active during any asynchronous observer method
notification.</text>
</assertion>
+
+ <group>
+ <text>The request scope is 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="ga">
- <text>The request scope is 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="ga" testable="false">
+ <text>Test the request scope is active during a remote method invocation of
any EJB.</text>
+ </assertion>
- <assertion id="gb">
- <text>The request scope is 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="gb" testable="false">
+ <text>Test the request scope is active during any asynchronous method
invocation of any EJB.</text>
+ </assertion>
- <assertion id="gc">
- <text>The request scope is 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="gc">
+ <text>Test the request scope is active during any call to an EJB timeout
method.</text>
+ </assertion>
- <assertion id="gd">
- <text>The request scope is 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="gd">
+ <text>Test the request scope is active during message delivery to any EJB
message-driven bean.</text>
+ </assertion>
+ </group>
+
<assertion id="ge">
<text>The request 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>
+
+ <group>
+ <text>The request context is destroyed at the end of the servlet request,
after the |service()| method and all |doFilter()| methods, and all |requestDestroyed()|
and |onComplete()| notifications return.</text>
- <assertion id="baa">
- <text>The request context is destroyed at the end of the servlet request,
after the |service()| method ~and all |doFilter()| methods~, and all |requestDestroyed()|
and |onComplete()| notifications return.</text>
- </assertion>
+ <assertion id="baa">
+ <text>Test the request context is destroyed at the end of the servlet
request, after the |service()| method.</text>
+ </assertion>
- <assertion id="bba">
- <text>The request context is destroyed at the end of the servlet request,
after ~the |service()| method and~ all |doFilter()| methods, and all |requestDestroyed()|
and |onComplete()| notifications return.</text>
- </assertion>
+ <assertion id="bba">
+ <text>Test the request context is destroyed after all |doFilter()| methods,
and all |requestDestroyed()| and |onComplete()| notifications return.</text>
+ </assertion>
+ </group>
<assertion id="d">
<text>The request context is destroyed after the web service invocation
completes.</text>
@@ -3067,22 +3087,26 @@
<assertion id="fa">
<text>The request context is destroyed after the asynchronous observer
notification completes</text>
</assertion>
-
- <assertion id="ha">
- <text>The request context is destroyed after the EJB remote method
invocation,~ asynchronous method invocation, timeout or message delivery
completes~.</text>
- </assertion>
+
+ <group>
+ <text>The request context is destroyed after the EJB remote method
invocation, asynchronous method invocation, timeout or message delivery
completes.</text>
+
+ <assertion id="ha" testable="false">
+ <text>Test the request context is destroyed after an EJB remote method
invocation.</text>
+ </assertion>
- <assertion id="hb">
- <text>The request context is destroyed after the ~EJB remote method
invocation,~ asynchronous method invocation~, timeout or message delivery
completes~.</text>
- </assertion>
+ <assertion id="hb">
+ <text>Test the request context is destroyed after an EJB asynchronous
method invocation.</text>
+ </assertion>
- <assertion id="hc">
- <text>The request context is destroyed after the ~EJB remote method
invocation, asynchronous method invocation,~ timeout~ or message delivery
completes~.</text>
- </assertion>
+ <assertion id="hc">
+ <text>Test the request context is destroyed after the EJB
timeout.</text>
+ </assertion>
- <assertion id="hd">
- <text>The request context is destroyed after the ~EJB remote method
invocation, asynchronous method invocation, timeout or~ message delivery
completes.</text>
- </assertion>
+ <assertion id="hd">
+ <text>Test the request context is destroyed after the message delivery
completes.</text>
+ </assertion>
+ </group>
<assertion id="i">
<text>The request context is destroyed after the message delivery to the
|MessageListener| completes.</text>