JBoss Native SVN: r2218 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-27 04:47:21 -0500 (Tue, 27 Jan 2009)
New Revision: 2218
Modified:
trunk/build/unix/build.sh
Log:
Make sure we are able to remove it on windoze.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2009-01-27 09:26:54 UTC (rev 2217)
+++ trunk/build/unix/build.sh 2009-01-27 09:47:21 UTC (rev 2218)
@@ -422,6 +422,7 @@
if $has_cache ; then
mkdir -p ${build_common_dir}
else
+ chmod -R u+rw ${build_common_dir}
rm -rf ${build_common_dir}
mkdir -p ${build_common_dir}
fi
@@ -1077,6 +1078,7 @@
export APIURLBACK
export api_version
+chmod -R u+rw ${package_src_dir}
rm -rf ${package_src_dir}
mkdir -p ${package_src_dir}/srclib
15 years, 11 months
JBoss Native SVN: r2217 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-27 04:26:54 -0500 (Tue, 27 Jan 2009)
New Revision: 2217
Modified:
trunk/build/unix/buildbin.mod_cluster.sh
trunk/build/unix/buildbin.mod_cluster.windows.sh
Log:
In dev12 IPv6 would require a different address (like FFFF::232.5.5.5).
So force IPv4.
Modified: trunk/build/unix/buildbin.mod_cluster.sh
===================================================================
--- trunk/build/unix/buildbin.mod_cluster.sh 2009-01-27 09:13:52 UTC (rev 2216)
+++ trunk/build/unix/buildbin.mod_cluster.sh 2009-01-27 09:26:54 UTC (rev 2217)
@@ -221,7 +221,7 @@
# Also build the java part.
(cd ../mod_cluster
- mvn -P dist package -Djboss.server.log.dir=`pwd`
+ mvn -P dist package -Djboss.server.log.dir=`pwd` -Djava.net.preferIPv4Stack=true
cp target/*-bin.* ${build_top}/output
)
Modified: trunk/build/unix/buildbin.mod_cluster.windows.sh
===================================================================
--- trunk/build/unix/buildbin.mod_cluster.windows.sh 2009-01-27 09:13:52 UTC (rev 2216)
+++ trunk/build/unix/buildbin.mod_cluster.windows.sh 2009-01-27 09:26:54 UTC (rev 2217)
@@ -77,7 +77,7 @@
# It is not working on dev16 so we ignore the error for the moment.
mod_cluster_sources=srclib/`ls srclib | grep mod_cluster`
(cd ${mod_cluster_sources} || exit 1
- mvn -P dist package -Djboss.server.log.dir=`pwd`
+ mvn -P dist package -Djboss.server.log.dir=`pwd` -Djava.net.preferIPv4Stack=true
cp target/*-bin.* ${build_top}/output
)
15 years, 11 months
JBoss Native SVN: r2216 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-27 04:13:52 -0500 (Tue, 27 Jan 2009)
New Revision: 2216
Modified:
trunk/build/unix/buildbin.mod_cluster.sh
trunk/build/unix/buildbin.mod_cluster.windows.sh
Log:
Prevent:
java.io.FileNotFoundException: /boot.log (Permission denied)
Modified: trunk/build/unix/buildbin.mod_cluster.sh
===================================================================
--- trunk/build/unix/buildbin.mod_cluster.sh 2009-01-26 21:05:35 UTC (rev 2215)
+++ trunk/build/unix/buildbin.mod_cluster.sh 2009-01-27 09:13:52 UTC (rev 2216)
@@ -221,7 +221,7 @@
# Also build the java part.
(cd ../mod_cluster
- mvn -P dist package
+ mvn -P dist package -Djboss.server.log.dir=`pwd`
cp target/*-bin.* ${build_top}/output
)
Modified: trunk/build/unix/buildbin.mod_cluster.windows.sh
===================================================================
--- trunk/build/unix/buildbin.mod_cluster.windows.sh 2009-01-26 21:05:35 UTC (rev 2215)
+++ trunk/build/unix/buildbin.mod_cluster.windows.sh 2009-01-27 09:13:52 UTC (rev 2216)
@@ -77,7 +77,7 @@
# It is not working on dev16 so we ignore the error for the moment.
mod_cluster_sources=srclib/`ls srclib | grep mod_cluster`
(cd ${mod_cluster_sources} || exit 1
- mvn -P dist package
+ mvn -P dist package -Djboss.server.log.dir=`pwd`
cp target/*-bin.* ${build_top}/output
)
15 years, 11 months
JBoss Native SVN: r2215 - in trunk/mod_cluster/src/main: resources and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2009-01-26 16:05:35 -0500 (Mon, 26 Jan 2009)
New Revision: 2215
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/DefaultJBossWebEventHandler.java
trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml
Log:
Store excluded contexts in a map, keyed by host.
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/DefaultJBossWebEventHandler.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/DefaultJBossWebEventHandler.java 2009-01-26 17:06:41 UTC (rev 2214)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/DefaultJBossWebEventHandler.java 2009-01-26 21:05:35 UTC (rev 2215)
@@ -24,8 +24,10 @@
import java.io.IOException;
import java.net.InetSocketAddress;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.apache.catalina.Container;
@@ -54,6 +56,10 @@
public class DefaultJBossWebEventHandler implements JBossWebEventHandler
{
private static final String ROOT_CONTEXT = "ROOT";
+ private static final String CONTEXT_DELIMITER = ",";
+ private static final String HOST_CONTEXT_DELIMITER = ":";
+ private static final String DEFAULT_HOST = "localhost";
+
static final Logger log = Logger.getLogger(DefaultJBossWebEventHandler.class);
// ----------------------------------------------------------------- Fields
@@ -69,7 +75,7 @@
private final MCMPRequestFactory requestFactory;
private final AdvertiseListenerFactory listenerFactory;
private final LoadBalanceFactorProviderFactory loadBalanceFactorProviderFactory;
- private final Set<String> excludedContextPaths = new HashSet<String>();
+ private final Map<String, Set<String>> excludedContextPaths = new HashMap<String, Set<String>>();
private volatile boolean init;
@@ -98,14 +104,43 @@
String contexts = this.mcmpConfig.getExcludedContexts();
- if ((contexts != null) && (contexts.length() > 0))
+ if (contexts != null)
{
- for (String context: contexts.split(","))
+ String trimmedContexts = contexts.trim();
+
+ if (trimmedContexts.length() > 0)
{
- String trimmedContext = context.trim();
- String path = trimmedContext.equals(ROOT_CONTEXT) ? "" : "/" + trimmedContext;
-
- this.excludedContextPaths.add(path);
+ for (String context: trimmedContexts.split(CONTEXT_DELIMITER))
+ {
+ String[] parts = context.trim().split(HOST_CONTEXT_DELIMITER);
+
+ if (parts.length > 2)
+ {
+ throw new IllegalArgumentException(trimmedContexts + " is not a valid value for excludedContexts");
+ }
+
+ String host = DEFAULT_HOST;
+ String trimmedContext = parts[0].trim();
+
+ if (parts.length == 2)
+ {
+ host = trimmedContext;
+ trimmedContext = parts[1].trim();
+ }
+
+ String path = trimmedContext.equals(ROOT_CONTEXT) ? "" : "/" + trimmedContext;
+
+ Set<String> paths = this.excludedContextPaths.get(host);
+
+ if (paths == null)
+ {
+ paths = new HashSet<String>();
+
+ this.excludedContextPaths.put(host, paths);
+ }
+
+ paths.add(path);
+ }
}
}
@@ -238,15 +273,14 @@
{
this.checkInit();
- String path = context.getPath();
-
- if (!this.excludedContextPaths.contains(path))
+ if (!this.exclude(context))
{
- log.debug(this.sm.getString("modcluster.context.enable", path, context.getParent().getName()));
-
+ log.info(context.getParent().getName() + ":" + context.getPath() + " is *not* exluded.");
// Send ENABLE-APP if state is started
if (Utils.isContextStarted(context))
{
+ log.debug(this.sm.getString("modcluster.context.enable", context.getPath(), context.getParent().getName()));
+
MCMPRequest request = this.requestFactory.createEnableRequest(context);
this.mcmpHandler.sendRequest(request);
@@ -258,11 +292,9 @@
{
this.checkInit();
- String path = context.getPath();
-
- if (!this.excludedContextPaths.contains(path))
+ if (!this.exclude(context))
{
- log.debug(this.sm.getString("modcluster.context.start", path, context.getParent().getName()));
+ log.debug(this.sm.getString("modcluster.context.start", context.getPath(), context.getParent().getName()));
// Send ENABLE-APP
MCMPRequest request = this.requestFactory.createEnableRequest(context);
@@ -275,11 +307,9 @@
{
this.checkInit();
- String path = context.getPath();
-
- if (!this.excludedContextPaths.contains(path))
+ if (!this.exclude(context))
{
- log.debug(this.sm.getString("modcluster.context.stop", path, context.getParent().getName()));
+ log.debug(this.sm.getString("modcluster.context.stop", context.getPath(), context.getParent().getName()));
// Send STOP-APP
MCMPRequest request = this.requestFactory.createStopRequest(context);
@@ -292,15 +322,13 @@
{
this.checkInit();
- String path = context.getPath();
-
- if (!this.excludedContextPaths.contains(path))
+ if (!this.exclude(context))
{
- log.debug(this.sm.getString("modcluster.context.disable", path, context.getParent().getName()));
-
// JVMRoute can be null here if nothing was ever initialized
if (Utils.getJvmRoute(context) != null)
{
+ log.debug(this.sm.getString("modcluster.context.disable", context.getPath(), context.getParent().getName()));
+
MCMPRequest request = this.requestFactory.createRemoveRequest(context);
this.mcmpHandler.sendRequest(request);
@@ -310,11 +338,11 @@
protected void removeAll(Engine engine)
{
- log.debug(this.sm.getString("modcluster.engine.stop", engine.getName()));
-
// JVMRoute can be null here if nothing was ever initialized
if (engine.getJvmRoute() != null)
{
+ log.debug(this.sm.getString("modcluster.engine.stop", engine.getName()));
+
// Send REMOVE-APP * request
MCMPRequest request = this.requestFactory.createRemoveRequest(engine);
@@ -349,4 +377,11 @@
throw new IllegalStateException(this.sm.getString("modcluster.error.uninitialized"));
}
}
+
+ private boolean exclude(Context context)
+ {
+ Set<String> excludedPaths = this.excludedContextPaths.get(context.getParent().getName());
+
+ return (excludedPaths != null) ? excludedPaths.contains(context.getPath()) : false;
+ }
}
Modified: trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml
===================================================================
--- trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml 2009-01-26 17:06:41 UTC (rev 2214)
+++ trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml 2009-01-26 21:05:35 UTC (rev 2215)
@@ -114,7 +114,7 @@
<constructor>
<parameter><inject bean="DynamicLoadBalanceFactorProvider"/></parameter>
</constructor>
- <!-- Comma separated list of address:port listing the httpd servers
+ <!-- Comma delimited list of address:port listing the httpd servers
where mod_cluster is running. -->
<property name="proxyList">${jboss.modcluster.proxyList}</property>
<!-- URL prefix to send with commands to mod_cluster. Default is no prefix. -->
@@ -122,8 +122,8 @@
<!-- mod_advertise is a small httpd module that advertises the
availability of httpd servers via multicast, allowing
- ModClusterService to discover the httpd front-end instead of/in
- addition to having them defined in proxyList. -->
+ ModClusterService to discover the httpd front-end instead of
+ (or in addition to) having them defined in proxyList. -->
<!-- Whether to listen for advertise messages -->
<property name="advertise">true</property>
<!-- Multicast address on which to listen for advertisements -->
@@ -131,8 +131,10 @@
<!-- Port to listen to for advertisements -->
<property name="advertisePort">${jboss.modcluster.advertise.port:23364}</property>
- <!-- List of contexts that should not be auto-registered with httpd delimited by commas. -->
+ <!-- Comma delimited list of contexts that should *not* be auto-registered with httpd. -->
<!-- ROOT indicates the root context. -->
+ <!-- Context may be qualified by host using a colon, e.g. host1:context1 -->
+ <!-- If no host is defined, localhost is assumed. -->
<property name="excludedContexts">${jboss.modcluster.excludedContexts:ROOT,invoker,jbossws,jmx-console,juddi,web-console}</property>
<!-- Security key the proxy is going to send with advertise messages.
15 years, 11 months
JBoss Native SVN: r2214 - trunk/mod_cluster/src/main/resources.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2009-01-26 12:06:41 -0500 (Mon, 26 Jan 2009)
New Revision: 2214
Modified:
trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml
Log:
Keep ROOT in excludedContexts.
JFC thinks it's a bad idea to include this by default.
Modified: trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml
===================================================================
--- trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml 2009-01-26 15:47:13 UTC (rev 2213)
+++ trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml 2009-01-26 17:06:41 UTC (rev 2214)
@@ -38,7 +38,7 @@
<!-- List of contexts that should not be auto-registered with httpd delimited by commas. -->
<!-- ROOT indicates the root context. -->
- <property name="excludedContexts">${jboss.modcluster.excludedContexts:invoker,jbossws,jmx-console,juddi,web-console}</property>
+ <property name="excludedContexts">${jboss.modcluster.excludedContexts:ROOT,invoker,jbossws,jmx-console,juddi,web-console}</property>
<!-- Security key the proxy is going to send with advertise messages.
Default is none. -->
@@ -133,7 +133,7 @@
<!-- List of contexts that should not be auto-registered with httpd delimited by commas. -->
<!-- ROOT indicates the root context. -->
- <property name="excludedContexts">${jboss.modcluster.excludedContexts:invoker,jbossws,jmx-console,juddi,web-console}</property>
+ <property name="excludedContexts">${jboss.modcluster.excludedContexts:ROOT,invoker,jbossws,jmx-console,juddi,web-console}</property>
<!-- Security key the proxy is going to send with advertise messages.
Default is none. -->
15 years, 11 months
JBoss Native SVN: r2213 - trunk/mod_cluster/src/main/resources.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2009-01-26 10:47:13 -0500 (Mon, 26 Jan 2009)
New Revision: 2213
Modified:
trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml
Log:
Use system property for excludedContexts - enable ROOT by default
Modified: trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml
===================================================================
--- trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml 2009-01-26 14:02:18 UTC (rev 2212)
+++ trunk/mod_cluster/src/main/resources/mod-cluster-jboss-beans.xml 2009-01-26 15:47:13 UTC (rev 2213)
@@ -38,7 +38,7 @@
<!-- List of contexts that should not be auto-registered with httpd delimited by commas. -->
<!-- ROOT indicates the root context. -->
- <property name="excludedContexts">ROOT,invoker,jbossws,jmx-console,juddi,web-console</property>
+ <property name="excludedContexts">${jboss.modcluster.excludedContexts:invoker,jbossws,jmx-console,juddi,web-console}</property>
<!-- Security key the proxy is going to send with advertise messages.
Default is none. -->
@@ -133,7 +133,7 @@
<!-- List of contexts that should not be auto-registered with httpd delimited by commas. -->
<!-- ROOT indicates the root context. -->
- <property name="excludedContexts">ROOT,invoker,jbossws,jmx-console,juddi,web-console</property>
+ <property name="excludedContexts">${jboss.modcluster.excludedContexts:invoker,jbossws,jmx-console,juddi,web-console}</property>
<!-- Security key the proxy is going to send with advertise messages.
Default is none. -->
15 years, 11 months
JBoss Native SVN: r2212 - trunk/mod_cluster/test/java.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-26 09:02:18 -0500 (Mon, 26 Jan 2009)
New Revision: 2212
Modified:
trunk/mod_cluster/test/java/installhttpd.sh
Log:
Oops :-(
Modified: trunk/mod_cluster/test/java/installhttpd.sh
===================================================================
--- trunk/mod_cluster/test/java/installhttpd.sh 2009-01-26 10:12:24 UTC (rev 2211)
+++ trunk/mod_cluster/test/java/installhttpd.sh 2009-01-26 14:02:18 UTC (rev 2212)
@@ -128,7 +128,7 @@
ant downloadfile -Dsourcefile=${TARBALL} -Ddestfile=${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT} -Ddestdir=$BASELOC
fi
else
- if [ "x${BASELOC}" = "x" ]
+ if [ "x${BUILDTEST}" = "x" ]
then
rm -f ${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
ant downloadfile -Dsourcefile=${TARBALL} -Ddestfile=${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT} -Ddestdir=$BASELOC
15 years, 11 months
JBoss Native SVN: r2211 - in trunk: mod_cluster/test/java and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-26 05:12:24 -0500 (Mon, 26 Jan 2009)
New Revision: 2211
Modified:
trunk/build/unix/buildtest.mod_cluster.sh
trunk/mod_cluster/test/java/installhttpd.sh
Log:
When calling by hudson Use our local build for tests.
Modified: trunk/build/unix/buildtest.mod_cluster.sh
===================================================================
--- trunk/build/unix/buildtest.mod_cluster.sh 2009-01-26 08:42:51 UTC (rev 2210)
+++ trunk/build/unix/buildtest.mod_cluster.sh 2009-01-26 10:12:24 UTC (rev 2211)
@@ -42,6 +42,9 @@
# the stuff is in /home/jfclere/jbossnative/trunk/build/unix/work/mod_cluster-1.0.0.dev-src/srclib/mod_cluster/src/test/java
# $root is /home/jfclere/jbossnative/trunk/build/unix/work/mod_cluster-1.0.0.dev-src/output/linux2-x64
anttestsdir=`cd $root/../../srclib/mod_cluster/test/java; pwd`
+BUILDTEST=Y
+export BUILDTEST
+export root
(cd $anttestsdir
ant
) || exit 1
Modified: trunk/mod_cluster/test/java/installhttpd.sh
===================================================================
--- trunk/mod_cluster/test/java/installhttpd.sh 2009-01-26 08:42:51 UTC (rev 2210)
+++ trunk/mod_cluster/test/java/installhttpd.sh 2009-01-26 10:12:24 UTC (rev 2211)
@@ -115,6 +115,9 @@
# Something like (note don't use ssl for the moment.
# http://hudson.qa.jboss.com/hudson/view/Native/job/mod_cluster-linux-x86_6...
# http://hudson.qa.jboss.com/hudson/view/Native/job/mod_cluster-solaris-x86...
+# The result of the build is something like:
+# /qa/services/hudson/hudson_workspace/workspace/mod_cluster-linux-i686/jbossnative/build/unix/output/mod_cluster-1.0.0.dev-linux2-x86.tar.gz
+#
TARBALL=http://hudson.qa.jboss.com/hudson/view/Native/job/${BASE}/lastSuc...
BASELOC=`ant base | grep echo | sed 's:\[echo\]::' | sed 's:^ *::'`
if [ "x${BASELOC}" = "x" ]
@@ -125,8 +128,14 @@
ant downloadfile -Dsourcefile=${TARBALL} -Ddestfile=${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT} -Ddestdir=$BASELOC
fi
else
- rm -f ${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
- ant downloadfile -Dsourcefile=${TARBALL} -Ddestfile=${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT} -Ddestdir=$BASELOC
+ if [ "x${BASELOC}" = "x" ]
+ then
+ rm -f ${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
+ ant downloadfile -Dsourcefile=${TARBALL} -Ddestfile=${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT} -Ddestdir=$BASELOC
+ else
+ echo "Using $root/${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}"
+ cp -p $root/${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT} .
+ fi
fi
TARBALL=`pwd`/${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
15 years, 11 months
JBoss Native SVN: r2210 - trunk/mod_cluster/test/java.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-26 03:42:51 -0500 (Mon, 26 Jan 2009)
New Revision: 2210
Modified:
trunk/mod_cluster/test/java/installhttpd.sh
Log:
Use ant instead wget.
Modified: trunk/mod_cluster/test/java/installhttpd.sh
===================================================================
--- trunk/mod_cluster/test/java/installhttpd.sh 2009-01-23 17:50:25 UTC (rev 2209)
+++ trunk/mod_cluster/test/java/installhttpd.sh 2009-01-26 08:42:51 UTC (rev 2210)
@@ -122,11 +122,11 @@
BASELOC=`pwd`
if [ ! -f ${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT} ]
then
- wget ${TARBALL}
+ ant downloadfile -Dsourcefile=${TARBALL} -Ddestfile=${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT} -Ddestdir=$BASELOC
fi
else
rm -f ${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
- wget ${TARBALL}
+ ant downloadfile -Dsourcefile=${TARBALL} -Ddestfile=${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT} -Ddestdir=$BASELOC
fi
TARBALL=`pwd`/${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
15 years, 11 months
JBoss Native SVN: r2209 - trunk/mod_cluster/test/java/org/jboss/mod_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-23 12:50:25 -0500 (Fri, 23 Jan 2009)
New Revision: 2209
Modified:
trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestBase.java
trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyForce.java
Log:
Prevent it waiting for ever.
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestBase.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestBase.java 2009-01-23 16:51:18 UTC (rev 2208)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestBase.java 2009-01-23 17:50:25 UTC (rev 2209)
@@ -79,12 +79,14 @@
String [] nodes = new String[2];
nodes[0] = "node1";
nodes[1] = "node2";
- while (!Maintest.checkProxyInfo(cluster, nodes)) {
+ int countinfo = 0;
+ while ((!Maintest.checkProxyInfo(cluster, nodes)) && countinfo < 20) {
try {
Thread.sleep(3000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
+ countinfo++;
}
// Start the client and wait for it.
@@ -122,12 +124,14 @@
fail("Client error");
// Wait until httpd as received the stop messages.
- while (!Maintest.checkProxyInfo(cluster, null)) {
+ countinfo = 0;
+ while ((!Maintest.checkProxyInfo(cluster, nodes)) && countinfo < 20) {
try {
Thread.sleep(3000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
+ countinfo++;
}
System.gc();
}
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyForce.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyForce.java 2009-01-23 16:51:18 UTC (rev 2208)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestStickyForce.java 2009-01-23 17:50:25 UTC (rev 2209)
@@ -81,12 +81,14 @@
String [] nodes = new String[2];
nodes[0] = "sticky3";
nodes[1] = "sticky4";
- while (!Maintest.checkProxyInfo(cluster, nodes)) {
+ int countinfo = 0;
+ while ((!Maintest.checkProxyInfo(cluster, nodes)) && countinfo < 20) {
try {
Thread.sleep(3000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
+ countinfo++;
}
// Start the client and wait for it.
@@ -149,20 +151,16 @@
}
// Wait until httpd as received the stop messages.
- try {
- Thread.sleep(5000);
- } catch (InterruptedException ex) {
- ex.printStackTrace();
- }
-/* In fact it doesn't stop correctly ... Something needs to be fixed
- while (!Maintest.checkProxyInfo(cluster, null)) {
+/* In fact it doesn't stop correctly ... Something needs to be fixed */
+ countinfo = 0;
+ while ((!Maintest.checkProxyInfo(cluster, null)) && countinfo<30) {
try {
Thread.sleep(3000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
+ countinfo++;
}
- */
// Test client result.
if ( !clienterror && client.httpResponseCode != 503 )
15 years, 11 months