shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kao...@apache.org
Subject svn commit: r904647 - /incubator/shiro/trunk/core/src/test/java/org/apache/shiro/session/mgt/DelegatingSessionTest.java
Date Fri, 29 Jan 2010 22:26:39 GMT
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);



Mime
View raw message