On 03/12/12 11:44, Brian Burch wrote:
On 02/12/12 22:00, Konstantin Kolinko wrote:
<snip/>
According to Buildbot logs, testBasicLoginSessionTimeout() runs for 2
minutes (125 seconds), mainly due to a sleep() call.

I wish there were a way to speed up this test.

My thoughts
a) Maybe use reflection to reduce StandardSession.lastAccessedTime and
thisAccessedTime by some fixed amount (60000) instead of waiting for
that time to pass.

That would speed up the test... but it sounds like adding a time machine
to the test class! My feeling is this would add inappropriate logical
complexity to a test that has always created and destroyed a tomcat
instance for each test case (there are now 15).

However, I intend to replicate most of the improvements from this test
class into the other authenticator tests, so I am already apprehensive
about adding too many 60+ second delays to the entire suite.

Mark and I briefly discussed adding a new protected method for use by
these timeout tests:

org.apache.catalina.session.StandardSession.setSessionTimeoutSecs(int secs)

Silly me! Sorry if that left you wondering what I meant. That particular method already exists, is public, and is called setSessionTimeout.

What I meant to suggest was this:

org.apache.catalina.core.StandardContext.setSessionTimeoutSecs(int timeout)

because it would be much simpler to modify the Context in the test setUp, rather than each individual Session.

What do you think?

<snip/>

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to