[jboss-cvs] JBossAS SVN: r64750 - in trunk/testsuite/src: resources/cluster/http/http-field and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 21 15:26:58 EDT 2007
Author: bstansberry at jboss.com
Date: 2007-08-21 15:26:58 -0400 (Tue, 21 Aug 2007)
New Revision: 64750
Modified:
trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java
trunk/testsuite/src/resources/cluster/http/http-field-jdk5/getAttribute.jsp
trunk/testsuite/src/resources/cluster/http/http-field/getAttribute.jsp
trunk/testsuite/src/resources/cluster/http/http-scoped/getAttribute.jsp
Log:
Fix jsp output mismatch in SessionPassivationTestCase
Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java 2007-08-21 18:32:07 UTC (rev 64749)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/SessionPassivationTestCase.java 2007-08-21 19:26:58 UTC (rev 64750)
@@ -51,11 +51,9 @@
protected String setUrl;
protected String getUrl;
- protected String getDeserializedUrl;
protected String warName_;
protected String setUrlBase_;
protected String getUrlBase_;
- protected String getDeserializedUrlBase_;
private ObjectName warObjectName;
private String warFqn_;
@@ -66,7 +64,6 @@
warName_ = "/http-scoped/";
setUrlBase_ = "setSession.jsp";
getUrlBase_ = "getAttribute.jsp";
- getDeserializedUrlBase_ = "getDeserialized.jsp";
concatenate();
}
@@ -75,7 +72,6 @@
{
setUrl = warName_ +setUrlBase_;
getUrl = warName_ +getUrlBase_;
- getDeserializedUrl = warName_ +getDeserializedUrlBase_;
}
protected String getWarName()
@@ -143,12 +139,6 @@
// Get the Attribute set
String attr0 = makeGet(client, baseURL0_ +getUrl);
- // Find out the session id and use it to build an FQN
- String sessionID = getSessionID(client, servers_[0]);
- // Strip off the jvmRoute, if there is one
- sessionID = stripJvmRoute(sessionID);
- String sessionFqn = "/JSESSION/localhost" + warName_ + sessionID;
-
sleepThread(DEFAULT_SLEEP);
// Make connection to server 1 and get
@@ -164,15 +154,10 @@
// and tomcat background process is using the default = 10 secs
sleepThread(11000);
- RMIAdaptor[] adaptors = getAdaptors();
-
- //session is passivate should not exist in the cache
-// assertFalse("Session is passivated therefore it is not in the cache...", SessionTestUtil.exists(adaptors[0], sessionFqn));
-
// activate the session by requesting the attribute
// Make connection to server 0 and get
setCookieDomainToThisServer(client, servers_[0]);
- String attr2 = checkDeserialization(client, baseURL0_ + getDeserializedUrl);
+ String attr2 = checkDeserialization(client, baseURL0_ + getUrl);
assertEquals("attribute match after activation", attr0, attr2);
}
@@ -197,12 +182,6 @@
// Get the Attribute set
String attr0 = makeGet(client, baseURL0_ +getUrl);
- // Find out the session id and use it to build an FQN
- String sessionID = getSessionID(client, servers_[0]);
- // Strip off the jvmRoute, if there is one
- sessionID = stripJvmRoute(sessionID);
- String sessionFqn = "/JSESSION/localhost" + warName_ + sessionID;
-
sleepThread(DEFAULT_SLEEP);
// Make connection to server 1 and get
@@ -228,13 +207,11 @@
}
getLog().debug("to reach max active sessions we needed to create " + clients.length + " clients");
- // Confirm passivation
-// assertFalse("Session is passivated therefore it is not in the cache...", SessionTestUtil.exists(adaptors[0], sessionFqn));
// activate the session by requesting the attribute
// Make connection to server 0 and get
setCookieDomainToThisServer(client, servers_[0]);
- String attr2 = checkDeserialization(client, baseURL0_ + getDeserializedUrl);
+ String attr2 = checkDeserialization(client, baseURL0_ + getUrl);
assertEquals("attribute match after activation", attr0, attr2);
}
Modified: trunk/testsuite/src/resources/cluster/http/http-field/getAttribute.jsp
===================================================================
--- trunk/testsuite/src/resources/cluster/http/http-field/getAttribute.jsp 2007-08-21 18:32:07 UTC (rev 64749)
+++ trunk/testsuite/src/resources/cluster/http/http-field/getAttribute.jsp 2007-08-21 19:26:58 UTC (rev 64750)
@@ -3,11 +3,15 @@
import="javax.servlet.ServletContext"
import="org.jboss.test.cluster.web.aop.Person"
import="org.jboss.test.cluster.web.aop.Address"
+ import="org.jboss.test.cluster.web.DeserializationSensor"
%>
<%
String isNew = session.isNew() ? "true" : "false";
response.setHeader("X-SessionIsNew", isNew);
+ DeserializationSensor sensor = (DeserializationSensor) session.getAttribute("TEST_DESERIALIZATION");
+ boolean deserialized = (sensor != null && sensor.isDeserialized());
+ response.setHeader("X-SessionDeserialzied", deserialized ? "true" : "false");
Person joe = (Person)session.getAttribute("TEST_PERSON");
Address addr = (Address)joe.getAddress();
Modified: trunk/testsuite/src/resources/cluster/http/http-field-jdk5/getAttribute.jsp
===================================================================
--- trunk/testsuite/src/resources/cluster/http/http-field-jdk5/getAttribute.jsp 2007-08-21 18:32:07 UTC (rev 64749)
+++ trunk/testsuite/src/resources/cluster/http/http-field-jdk5/getAttribute.jsp 2007-08-21 19:26:58 UTC (rev 64750)
@@ -3,11 +3,15 @@
import="javax.servlet.ServletContext"
import="org.jboss.test.cluster.web.aop.jdk5.Person"
import="org.jboss.test.cluster.web.aop.jdk5.Address"
+ import="org.jboss.test.cluster.web.DeserializationSensor"
%>
<%
String isNew = session.isNew() ? "true" : "false";
response.setHeader("X-SessionIsNew", isNew);
+ DeserializationSensor sensor = (DeserializationSensor) session.getAttribute("TEST_DESERIALIZATION");
+ boolean deserialized = (sensor != null && sensor.isDeserialized());
+ response.setHeader("X-SessionDeserialzied", deserialized ? "true" : "false");
Person joe = (Person)session.getAttribute("TEST_PERSON");
Address addr = (Address)joe.getAddress();
Modified: trunk/testsuite/src/resources/cluster/http/http-scoped/getAttribute.jsp
===================================================================
--- trunk/testsuite/src/resources/cluster/http/http-scoped/getAttribute.jsp 2007-08-21 18:32:07 UTC (rev 64749)
+++ trunk/testsuite/src/resources/cluster/http/http-scoped/getAttribute.jsp 2007-08-21 19:26:58 UTC (rev 64750)
@@ -1,9 +1,13 @@
<%@page contentType="text/html"
import="java.util.*"
import="org.jboss.test.cluster.web.Person"
+ import="org.jboss.test.cluster.web.DeserializationSensor"
%>
<%
String isNew = session.isNew() ? "true" : "false";
response.setHeader("X-SessionIsNew", isNew);
+ DeserializationSensor sensor = (DeserializationSensor) session.getAttribute("TEST_DESERIALIZATION");
+ boolean deserialized = (sensor != null && sensor.isDeserialized());
+ response.setHeader("X-SessionDeserialzied", deserialized ? "true" : "false");
%>
<%=((Person)session.getAttribute("TEST_PERSON")).getName() %>
More information about the jboss-cvs-commits
mailing list