Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-486

org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest

    XMLWordPrintable

Details

    • CTS Challenge
    • Resolution: Done
    • Major
    • 2.0.0.Alpha3, 1.2.6.Final
    • 1.2.4.Final, 1.2.5.Final
    • None
    • None

    Description

      We see that java.util.concurrent.SynchronousQueue is Serializable, and probably what they are using.... but when its serializes, it appears it ends up creating new queues under the covers... so will not work like they expect.

      Section 13.2.4 of the EJB Specification states:

      The bean may pass some client-specific information at timer creation to help it recognize the significance of a timer’s expiration. This information is stored by the Timer Service and available through the timer. The information object must be serializable.

      There is no requirement anywhere in the specification that indicates the container may not serialize the object, then deserialize it later when getInfo() is called. In fact, this must occur when storing persistent timers.

      This test is passing a SynchronousQueue, which is serializable, but when serialized and then deserialized, the resulting object will no longer be connected to the same queues as the original. Test client code will not be able to communicate with the running timer by using this object. It may work at times and or for some implementations, but is not guaranteed to work by the specification.

      testng-results.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <testng-results skipped="0" failed="1" total="1" passed="0">
      <reporter-output>
      </reporter-output>
      <suite name="Weld / JBoss AS run of CDI TCK" duration-ms="21312" started-at="2015-05-11T19:25:41Z" finished-at="2015-05-11T19:26:02Z">
      <groups>
      <group name="javaee-full">
      <method signature="RequestScopeEventTimeoutTest.testEventsFired()[pri:0, instance:org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest@a21a180e]" name="testEventsFired" class="org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest"/>
      </group> <!-- javaee-full -->
      </groups>
      <test name="CDI TCK" duration-ms="21312" started-at="2015-05-11T19:25:41Z" finished-at="2015-05-11T19:26:02Z">
      <class name="org.jboss.cdi.tck.tests.lookup.manager.provider.custom.CustomCDIProviderTest">
      <test-method status="PASS" signature="arquillianBeforeSuite()[pri:0, instance:org.jboss.cdi.tck.tests.lookup.manager.provider.custom.CustomCDIProviderTest@68c30012]" name="arquillianBeforeSuite" is-config="true" duration-ms="6323" started-at="2015-05-11T15:25:35Z" finished-at="2015-05-11T15:25:41Z">
      <reporter-output>
      </reporter-output>
      </test-method> <!-- arquillianBeforeSuite -->
      <test-method status="PASS" signature="arquillianAfterSuite()[pri:0, instance:org.jboss.cdi.tck.tests.lookup.manager.provider.custom.CustomCDIProviderTest@68c30012]" name="arquillianAfterSuite" is-config="true" duration-ms="1799" started-at="2015-05-11T15:26:02Z" finished-at="2015-05-11T15:26:04Z">
      <reporter-output>
      </reporter-output>
      </test-method> <!-- arquillianAfterSuite -->
      </class> <!-- org.jboss.cdi.tck.tests.lookup.manager.provider.custom.CustomCDIProviderTest -->
      <class name="org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest">
      <test-method status="PASS" signature="arquillianBeforeClass()[pri:0, instance:org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest@a21a180e]" name="arquillianBeforeClass" is-config="true" duration-ms="11541" started-at="2015-05-11T15:25:41Z" finished-at="2015-05-11T15:25:52Z">
      <reporter-output>
      </reporter-output>
      </test-method> <!-- arquillianBeforeClass -->
      <test-method status="PASS" signature="arquillianBeforeTest(java.lang.reflect.Method)[pri:0, instance:org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest@a21a180e]" name="arquillianBeforeTest" is-config="true" duration-ms="47" started-at="2015-05-11T15:25:53Z" finished-at="2015-05-11T15:25:53Z">
      <params>
      <param index="0">
      <value>
      <![CDATA[public void org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest.testEventsFired() throws java.lang.Exception]]>
      </value>
      </param>
      </params>
      <reporter-output>
      </reporter-output>
      </test-method> <!-- arquillianBeforeTest -->
      <test-method status="FAIL" signature="testEventsFired()[pri:0, instance:org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest@a21a180e]" name="testEventsFired" duration-ms="8973" started-at="2015-05-11T15:25:53Z" finished-at="2015-05-11T15:26:02Z">
      <exception class="java.lang.AssertionError">
      <message>
      <![CDATA[expected [true] but found [null]]]>
      </message>
      <full-stacktrace>
      <![CDATA[java.lang.AssertionError: expected [true] but found [null]
      at org.testng.Assert.fail(Assert.java:94)
      at org.testng.Assert.failNotEquals(Assert.java:494)
      at org.testng.Assert.assertEquals(Assert.java:123)
      at org.testng.Assert.assertEquals(Assert.java:176)
      at org.testng.Assert.assertEquals(Assert.java:186)
      at org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest.checkContent(RequestScopeEventTimeoutTest.java:77)
      at org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest.testEventsFired(RequestScopeEventTimeoutTest.java:68)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
      at java.lang.reflect.Method.invoke(Method.java:620)
      at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
      at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:182)
      at org.jboss.arquillian.testng.Arquillian$2.invoke(Arquillian.java:167)
      at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
      at java.lang.reflect.Method.invoke(Method.java:620)
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
      at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
      at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
      at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:53)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
      at java.lang.reflect.Method.invoke(Method.java:620)
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
      at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
      at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
      at java.lang.reflect.Method.invoke(Method.java:620)
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:95)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
      at java.lang.reflect.Method.invoke(Method.java:620)
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:71)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
      at java.lang.reflect.Method.invoke(Method.java:620)
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:46)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
      at java.lang.reflect.Method.invoke(Method.java:620)
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
      at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)
      at org.jboss.arquillian.testng.Arquillian.run(Arquillian.java:158)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
      at java.lang.reflect.Method.invoke(Method.java:620)
      at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:194)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:707)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
      at org.testng.TestRunner.privateRun(TestRunner.java:767)
      at org.testng.TestRunner.run(TestRunner.java:617)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
      at org.testng.SuiteRunner.run(SuiteRunner.java:240)
      at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
      at org.testng.TestNG.run(TestNG.java:1031)
      at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:293)
      at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
      at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:91)
      at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      ]]>
      </full-stacktrace>
      </exception> <!-- java.lang.AssertionError -->
      <reporter-output>
      </reporter-output>
      </test-method> <!-- testEventsFired -->
      <test-method status="PASS" signature="arquillianAfterTest(java.lang.reflect.Method)[pri:0, instance:org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest@a21a180e]" name="arquillianAfterTest" is-config="true" duration-ms="3" started-at="2015-05-11T15:26:02Z" finished-at="2015-05-11T15:26:02Z">
      <params>
      <param index="0">
      <value>
      <![CDATA[public void org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest.testEventsFired() throws java.lang.Exception]]>
      </value>
      </param>
      </params>
      <reporter-output>
      </reporter-output>
      </test-method> <!-- arquillianAfterTest -->
      <test-method status="PASS" signature="arquillianAfterClass()[pri:0, instance:org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest@a21a180e]" name="arquillianAfterClass" is-config="true" duration-ms="720" started-at="2015-05-11T15:26:02Z" finished-at="2015-05-11T15:26:02Z">
      <reporter-output>
      </reporter-output>
      </test-method> <!-- arquillianAfterClass -->
      </class> <!-- org.jboss.cdi.tck.tests.context.request.event.timeout.RequestScopeEventTimeoutTest -->
      </test> <!-- CDI TCK -->
      </suite> <!-- Weld / JBoss AS run of CDI TCK -->
      </testng-results>

      Attachments

        Activity

          People

            tremes1@redhat.com Tomas Remes
            lancea_jira Lance Andersen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty