[jboss-cvs] JBossAS SVN: r82160 - trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Dec 9 15:48:57 EST 2008
Author: bstansberry at jboss.com
Date: 2008-12-09 15:48:57 -0500 (Tue, 09 Dec 2008)
New Revision: 82160
Modified:
trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionBasedMaxUnreplicatedIntervalTestCase.java
Log:
Javadoc
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionBasedMaxUnreplicatedIntervalTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionBasedMaxUnreplicatedIntervalTestCase.java 2008-12-09 20:38:57 UTC (rev 82159)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionBasedMaxUnreplicatedIntervalTestCase.java 2008-12-09 20:48:57 UTC (rev 82160)
@@ -122,6 +122,16 @@
return ReplicationTrigger.SET_AND_NON_PRIMITIVE_GET;
}
+ /**
+ * Tests that a maxUnreplicatedInterval of 1 second prevents inadvertent
+ * session expiration. Test makes a read-only request after the
+ * maxUnreplicatedInterval has passed, waits long enough for the session
+ * to expire on the remote node if the read-only request didn't trigger a
+ * timestamp replication, and then accesses the session on the 2nd node to
+ * confirm that the session is still alive.
+ *
+ * @throws Exception
+ */
public void testBasicMaxIntervalPreventsExpiration() throws Exception
{
log.info("++++ Starting testBasicMaxIntervalPreventsExpiration ++++");
@@ -129,6 +139,16 @@
maxIntervalPreventsExpirationTest(false);
}
+ /**
+ * Tests that the override maxUnreplicatedInterval of 0 prevents inadvertent
+ * session expiration. Test makes a read-only request after one second
+ * has passed, waits long enough for the session
+ * to expire on the remote node if the read-only request didn't trigger a
+ * timestamp replication, and then accesses the session on the 2nd node to
+ * confirm that the session is still alive.
+ *
+ * @throws Exception
+ */
public void testZeroMaxIntervalPreventsExpiration() throws Exception
{
log.info("++++ Starting testZeroMaxIntervalPreventsExpiration ++++");
@@ -147,6 +167,7 @@
JBossCacheManager jbcm0 = mgrs[0];
JBossCacheManager jbcm1 = mgrs[1];
+ // Establish session.
SetAttributesRequestHandler setHandler = new SetAttributesRequestHandler(allAttributes, false);
SessionTestUtil.invokeRequest(jbcm0, setHandler, null);
@@ -171,6 +192,17 @@
validateExpectedAttributes(allAttributes, getHandler);
}
+ /**
+ * Tests that setting a maxUnreplicatedInterval of 1 second prevents
+ * timestamp replication during read-only requests during that one second.
+ * Test makes a read-only request during the 1 second maxUnreplicatedInterval,
+ * which should prevent timestamp replication. Test then waits long enough
+ * for the session to be considered expired on the remote node only if the
+ * timestamp wasn't replicated. Test fails over to remote node and confirms
+ * that the session was expired.
+ *
+ * @throws Exception
+ */
public void testMaxIntervalPreventsReplication() throws Exception
{
log.info("++++ Starting testMaxIntervalPreventsReplication ++++");
More information about the jboss-cvs-commits
mailing list