You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by ka...@apache.org on 2010/01/29 23:26:39 UTC
svn commit: r904647 -
/incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DelegatingSessionTest.java
Author: kaosko
Date: Fri Jan 29 22:26:39 2010
New Revision: 904647
URL: http://svn.apache.org/viewvc?rev=904647&view=rev
Log:
testTimeout failed on the last Hudson run after I added the fix for SHIRO-133 (that did modify the behaviof of SessionValidator). However, it doesn't seems there's anything wrong with the code. The test is unreliable since it's unpredictable when exactly the executor runs the next time. Made the test more robust by touching the session just before the setTimeout() (that caused it to fail, i.e. it expired even before when it was expected to expire)
Modified:
incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DelegatingSessionTest.java
Modified: incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DelegatingSessionTest.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DelegatingSessionTest.java?rev=904647&r1=904646&r2=904647&view=diff
==============================================================================
--- incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DelegatingSessionTest.java (original)
+++ incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DelegatingSessionTest.java Fri Jan 29 22:26:39 2010
@@ -62,6 +62,7 @@
public void testTimeout() {
Serializable origId = session.getId();
assertEquals(session.getTimeout(), AbstractSessionManager.DEFAULT_GLOBAL_SESSION_TIMEOUT);
+ session.touch();
session.setTimeout(100);
assertEquals(100, session.getTimeout());
sleep(150);