[jboss-cvs] JBossAS SVN: r65054 - branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Sep 4 13:12:49 EDT 2007
Author: bstansberry at jboss.com
Date: 2007-09-04 13:12:49 -0400 (Tue, 04 Sep 2007)
New Revision: 65054
Modified:
branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/SimpleTestCase.java
Log:
Add another test
Modified: branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/SimpleTestCase.java
===================================================================
--- branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/SimpleTestCase.java 2007-09-04 16:57:00 UTC (rev 65053)
+++ branches/Branch_4_2/testsuite/src/main/org/jboss/test/cluster/test/SimpleTestCase.java 2007-09-04 17:12:49 UTC (rev 65054)
@@ -165,9 +165,9 @@
getLog().debug("Exit testSessionTimeout");
}
- public void testMaxUnreplicatedInterval()
+ public void testMaxUnreplicatedInterval1()
{
- getLog().debug("Enter testMaxUnreplicatedInterval");
+ getLog().debug("Enter testMaxUnreplicatedInterval1");
String setURLName = "/http-sr/testsessionreplication.jsp";
String getURLName = "/http-sr/getattribute.jsp";
@@ -198,4 +198,43 @@
assertEquals("Session still present", attr, attr1);
}
+
+ public void testMaxUnreplicatedInterval2()
+ {
+ getLog().debug("Enter testMaxUnreplicatedInterval2");
+
+ String setURLName = "/http-sr/testsessionreplication.jsp";
+ String getURLName = "/http-sr/getattribute.jsp";
+ String versionURLName = "/http-sr/version.jsp";
+
+ // Create an instance of HttpClient.
+ HttpClient client = new HttpClient();
+
+ // Set the session attribute first
+ makeGet(client, baseURL0_ +setURLName);
+ // Get the Attribute set by testsessionreplication.jsp
+ String attr = makeGetWithState(client, baseURL0_ +getURLName);
+
+ // Sleep 50% of the maxInactiveInterval -- long enough
+ sleepThread(10000);
+
+ // Access the session without touching any attribute
+ String ver = makeGetWithState(client, baseURL0_ +versionURLName);
+
+ // Sleep some more, long enough for the session to replicate
+ // if the last request incorrectly caused replication
+ sleepThread(2000);
+
+ // Switch servers
+ setCookieDomainToThisServer(client, servers_[1]);
+
+ String ver1 = makeGetWithState(client, baseURL1_ +versionURLName);
+
+ assertEquals("Session version count unchanged", ver, ver1);
+
+ // Get the Attribute set by testsessionreplication.jsp
+ String attr1 = makeGetWithState(client, baseURL1_ +getURLName);
+
+ assertEquals("Session still present", attr, attr1);
+ }
}
More information about the jboss-cvs-commits
mailing list