-
Bug
-
Resolution: Done
-
Major
-
1.0.4.Final
-
None
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.