Author: jfrederic.clere(a)jboss.com
Date: 2008-11-27 08:02:14 -0500 (Thu, 27 Nov 2008)
New Revision: 2073
Modified:
trunk/mod_cluster/test/java/org/jboss/mod_cluster/Client.java
trunk/mod_cluster/test/java/org/jboss/mod_cluster/ClientBasicAuthen.java
trunk/mod_cluster/test/java/org/jboss/mod_cluster/Domaintest.java
trunk/mod_cluster/test/java/org/jboss/mod_cluster/JBossWeb.java
trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestBase.java
trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestFailover.java
trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyForce.java
trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyRemove.java
Log:
Arrange the base URL (to allow easy changes).
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/Client.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/Client.java 2008-11-27 13:01:19 UTC
(rev 2072)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/Client.java 2008-11-27 13:02:14 UTC
(rev 2073)
@@ -40,6 +40,8 @@
private String jsessionid = null;
private String URL = null;
+
+ private String BaseURL = "http://localhost:8000";
String post = null;
String user = null;
String pass = null;
@@ -120,7 +122,11 @@
}
public int runit(String URL, int nbtest, boolean checkcookie) throws Exception
{
- this.URL = URL;
+ if (URL.startsWith("http://"))
+ this.URL = URL;
+ else {
+ this.URL = BaseURL.concat(URL);
+ }
this.checkcookie = checkcookie;
this.nbtest = nbtest;
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/ClientBasicAuthen.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/ClientBasicAuthen.java 2008-11-27
13:01:19 UTC (rev 2072)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/ClientBasicAuthen.java 2008-11-27
13:02:14 UTC (rev 2073)
@@ -112,7 +112,7 @@
data = data.concat("a");
int ret = 0;
try {
- ret = client.runit("http://localhost:7779/JBWEB-117/JBWEB_117", 1,
true, data, "manager" , "manager", fd);
+ ret = client.runit("/JBWEB-117/JBWEB_117", 1, true, data,
"manager" , "manager", fd);
client.start();
client.join();
} catch (Exception ex) {
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/Domaintest.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/Domaintest.java 2008-11-27 13:01:19
UTC (rev 2072)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/Domaintest.java 2008-11-27 13:02:14
UTC (rev 2073)
@@ -64,7 +64,7 @@
Client client = new Client();
try {
- client.runit("http://localhost:7779/ROOT/MyCount", 10, false,
true);
+ client.runit("/ROOT/MyCount", 10, false, true);
} catch (Exception ex) {
ex.printStackTrace();
clienterror = true;
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/JBossWeb.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/JBossWeb.java 2008-11-27 13:01:19
UTC (rev 2072)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/JBossWeb.java 2008-11-27 13:02:14
UTC (rev 2073)
@@ -207,7 +207,7 @@
server.addService(service);
service2 = new JBossWeb("node2", "localhost");
- service2.addConnector(8000);
+ service2.addConnector(8010);
server.addService(service2);
LifecycleListener cluster =
Maintest.createClusterListener("232.0.0.2", 23364, false);
@@ -247,7 +247,7 @@
// Wait for it.
try {
- client.runit("http://localhost:7779/ROOT/MyCount", 10, true);
+ client.runit("/ROOT/MyCount", 10, true);
client.start();
client.join();
} catch (Exception ex) {
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestBase.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestBase.java 2008-11-27 13:01:19
UTC (rev 2072)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestBase.java 2008-11-27 13:02:14
UTC (rev 2073)
@@ -57,7 +57,7 @@
server.addService(service);
service2 = new JBossWeb("node2", "localhost");
- service2.addConnector(8000);
+ service2.addConnector(8010);
server.addService(service2);
cluster = Maintest.createClusterListener("232.0.0.2", 23364,
false);
@@ -87,7 +87,7 @@
// Wait for it.
try {
- client.runit("http://localhost:7779/ROOT/MyCount", 10, true);
+ client.runit("/ROOT/MyCount", 10, true);
client.start();
client.join();
} catch (Exception ex) {
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestFailover.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestFailover.java 2008-11-27
13:01:19 UTC (rev 2072)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestFailover.java 2008-11-27
13:02:14 UTC (rev 2073)
@@ -61,7 +61,7 @@
server.addService(service);
service2 = new JBossWeb("node4", "localhost");
- connector2 = service2.addConnector(8000);
+ connector2 = service2.addConnector(8010);
server.addService(service2);
cluster = Maintest.createClusterListener("232.0.0.2", 23364, false,
"dom1");
@@ -89,7 +89,7 @@
// Wait for it.
try {
- if (client.runit("http://localhost:7779/ROOT/MyCount", 10, false,
true) != 0)
+ if (client.runit("/ROOT/MyCount", 10, false, true) != 0)
clienterror = true;
} catch (Exception ex) {
ex.printStackTrace();
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyForce.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyForce.java 2008-11-27
13:01:19 UTC (rev 2072)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyForce.java 2008-11-27
13:02:14 UTC (rev 2073)
@@ -89,7 +89,7 @@
// Wait for it.
try {
- if (client.runit("http://localhost:7779/ROOT/MyCount", 10, false,
true) != 0)
+ if (client.runit("/ROOT/MyCount", 10, false, true) != 0)
clienterror = true;
} catch (Exception ex) {
ex.printStackTrace();
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyRemove.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyRemove.java 2008-11-27
13:01:19 UTC (rev 2072)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyRemove.java 2008-11-27
13:02:14 UTC (rev 2073)
@@ -89,7 +89,7 @@
// Wait for it.
try {
- if (client.runit("http://localhost:7779/ROOT/MyCount", 10, false,
true) != 0)
+ if (client.runit("/ROOT/MyCount", 10, false, true) != 0)
clienterror = true;
} catch (Exception ex) {
ex.printStackTrace();