[weld-issues] [JBoss JIRA] (CDITCK-219) SessionContextTest.testSessionContextDestroyedWhenHttpSessionTimesOut uses too short of a sleep delay time
Martin Kouba (JIRA)
jira-events at lists.jboss.org
Wed Feb 15 08:52:36 EST 2012
[ https://issues.jboss.org/browse/CDITCK-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Kouba resolved CDITCK-219.
---------------------------------
Assignee: Martin Kouba
Fix Version/s: 1.1.0.Alpha2
Resolution: Done
Sleep interval increased to 3000ms.
> SessionContextTest.testSessionContextDestroyedWhenHttpSessionTimesOut uses too short of a sleep delay time
> ----------------------------------------------------------------------------------------------------------
>
> Key: CDITCK-219
> URL: https://issues.jboss.org/browse/CDITCK-219
> Project: CDI TCK
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Tests
> Affects Versions: 1.0.4.Final
> Reporter: Bob Nettleton
> Assignee: Martin Kouba
> Fix For: 1.1.0.Alpha2
>
>
> The following test case:
> org.jboss.jsr299.tck.tests.context.session.SessionContextTest.testSessionContextDestroyedWhenHttpSessionTimesOut
> uses the following line to sleep after asking the application server to invalidate the session:
> " Thread.sleep(1500);"
> The test attempts to verify that the session context is destroyed properly after the timeout.
> The problem with this test is that it appears as if it could potentially introduce a timing problem. Since Thread.sleep() behaves slightly differently for each platform, and as far as I can tell is not even guaranteed to sleep as long as requested in some situations, there is a chance that the client may make the second request before 1.5 seconds has expired. Since the behavior of System.getTimeMillis() is also system-dependent, I'd be inclined to think that 1.5 seconds is probably not a long enough timeout in order to keep this test from having intermittent failures.
> I request that this test case be excluded, and that this test be modified in a later version of the TCK to use a larger sleep value.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the weld-issues
mailing list