JBoss Native SVN: r2247 - trunk/mod_cluster.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2009-01-29 11:02:18 -0500 (Thu, 29 Jan 2009)
New Revision: 2247
Modified:
trunk/mod_cluster/.classpath
Log:
Add src/demo/java to build classpath.
Modified: trunk/mod_cluster/.classpath
===================================================================
--- trunk/mod_cluster/.classpath 2009-01-29 14:52:06 UTC (rev 2246)
+++ trunk/mod_cluster/.classpath 2009-01-29 16:02:18 UTC (rev 2247)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" output="target/demo/classes" path="src/demo/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
15 years, 11 months
JBoss Native SVN: r2246 - trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2009-01-29 09:52:06 -0500 (Thu, 29 Jan 2009)
New Revision: 2246
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java
Log:
Try to improve test reliability
Modified: trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java
===================================================================
--- trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java 2009-01-29 14:47:21 UTC (rev 2245)
+++ trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java 2009-01-29 14:52:06 UTC (rev 2246)
@@ -79,7 +79,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(30.0, load, 1.0);
+ Assert.assertEquals(30.0, load, 2.0);
EasyMock.reset(this.server);
@@ -99,7 +99,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(20.0, load, 1.0);
+ Assert.assertEquals(20.0, load, 2.0);
EasyMock.reset(this.server);
}
Modified: trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java
===================================================================
--- trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java 2009-01-29 14:47:21 UTC (rev 2245)
+++ trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java 2009-01-29 14:52:06 UTC (rev 2246)
@@ -77,7 +77,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(30.0, load, 1.0);
+ Assert.assertEquals(30.0, load, 2.0);
EasyMock.reset(this.server);
@@ -98,7 +98,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(20.0, load, 1.0);
+ Assert.assertEquals(20.0, load, 2.0);
EasyMock.reset(this.server);
}
Modified: trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java
===================================================================
--- trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java 2009-01-29 14:47:21 UTC (rev 2245)
+++ trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java 2009-01-29 14:52:06 UTC (rev 2246)
@@ -77,7 +77,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(30.0, load, 1.0);
+ Assert.assertEquals(30.0, load, 2.0);
EasyMock.reset(this.server);
@@ -97,7 +97,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(20.0, load, 1.0);
+ Assert.assertEquals(20.0, load, 2.0);
EasyMock.reset(this.server);
}
15 years, 11 months
JBoss Native SVN: r2245 - trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2009-01-29 09:47:21 -0500 (Thu, 29 Jan 2009)
New Revision: 2245
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java
Log:
Try to improve test reliability
Modified: trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java
===================================================================
--- trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java 2009-01-29 14:45:07 UTC (rev 2244)
+++ trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java 2009-01-29 14:47:21 UTC (rev 2245)
@@ -44,6 +44,8 @@
@Override
public void getLoad() throws Exception
{
+ Thread.sleep(1);
+
EasyMock.expect(this.server.getAttribute(this.name1, ReceiveTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(0);
EasyMock.expect(this.server.getAttribute(this.name2, ReceiveTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(0);
@@ -64,7 +66,7 @@
EasyMock.replay(this.server);
- long sleep = 500 - (System.currentTimeMillis() - start);
+ long sleep = 1000 - (System.currentTimeMillis() - start);
if (sleep > 0)
{
@@ -77,7 +79,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(60.0, load, 1.0);
+ Assert.assertEquals(30.0, load, 1.0);
EasyMock.reset(this.server);
@@ -86,7 +88,7 @@
EasyMock.replay(this.server);
- sleep = 500 - (System.currentTimeMillis() - start);
+ sleep = 1000 - (System.currentTimeMillis() - start);
if (sleep > 0)
{
@@ -97,7 +99,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(40.0, load, 1.0);
+ Assert.assertEquals(20.0, load, 1.0);
EasyMock.reset(this.server);
}
Modified: trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java
===================================================================
--- trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java 2009-01-29 14:45:07 UTC (rev 2244)
+++ trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java 2009-01-29 14:47:21 UTC (rev 2245)
@@ -64,7 +64,7 @@
EasyMock.replay(this.server);
- long sleep = 500 - (System.currentTimeMillis() - start);
+ long sleep = 1000 - (System.currentTimeMillis() - start);
if (sleep > 0)
{
@@ -77,7 +77,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(60.0, load, 1.0);
+ Assert.assertEquals(30.0, load, 1.0);
EasyMock.reset(this.server);
@@ -87,7 +87,7 @@
EasyMock.replay(this.server);
- sleep = 500 - (System.currentTimeMillis() - start);
+ sleep = 1000 - (System.currentTimeMillis() - start);
if (sleep > 0)
{
@@ -98,7 +98,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(40.0, load, 1.0);
+ Assert.assertEquals(20.0, load, 1.0);
EasyMock.reset(this.server);
}
Modified: trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java
===================================================================
--- trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java 2009-01-29 14:45:07 UTC (rev 2244)
+++ trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java 2009-01-29 14:47:21 UTC (rev 2245)
@@ -64,7 +64,7 @@
EasyMock.replay(this.server);
- long sleep = 500 - (System.currentTimeMillis() - start);
+ long sleep = 1000 - (System.currentTimeMillis() - start);
if (sleep > 0)
{
@@ -77,7 +77,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(60.0, load, 1.0);
+ Assert.assertEquals(30.0, load, 1.0);
EasyMock.reset(this.server);
@@ -86,7 +86,7 @@
EasyMock.replay(this.server);
- sleep = 500 - (System.currentTimeMillis() - start);
+ sleep = 1000 - (System.currentTimeMillis() - start);
if (sleep > 0)
{
@@ -97,7 +97,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(40.0, load, 1.0);
+ Assert.assertEquals(20.0, load, 1.0);
EasyMock.reset(this.server);
}
15 years, 11 months
JBoss Native SVN: r2244 - in trunk/mod_cluster/test: native and 1 other directory.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-29 09:45:07 -0500 (Thu, 29 Jan 2009)
New Revision: 2244
Added:
trunk/mod_cluster/test/native/
trunk/mod_cluster/test/native/Advertise.c
trunk/mod_cluster/test/native/Makefile
Log:
Add a small Advertise test.
Added: trunk/mod_cluster/test/native/Advertise.c
===================================================================
--- trunk/mod_cluster/test/native/Advertise.c (rev 0)
+++ trunk/mod_cluster/test/native/Advertise.c 2009-01-29 14:45:07 UTC (rev 2244)
@@ -0,0 +1,63 @@
+/*
+ * Advertise (test for multicast)
+ *
+ * Copyright(c) 2009 Red Hat Middleware, LLC,
+ * and individual contributors as indicated by the @authors tag.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library in the file COPYING.LIB;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ * @author Jean-Frederic Clere
+ */
+
+#include "apr.h"
+#include "apr_network_io.h"
+#include "apr_strings.h"
+
+int main(int argc, char **argv)
+{
+ apr_pool_t *pool;
+ apr_status_t rv;
+ apr_sockaddr_t *ma_mgroup_sa;
+ apr_socket_t *ma_mgroup_socket;
+
+ apr_initialize();
+ atexit(apr_terminate);
+
+ apr_pool_create(&pool, NULL);
+
+ rv = apr_sockaddr_info_get(&ma_mgroup_sa, "224.0.1.105", APR_INET, 23364, APR_UNSPEC, pool);
+ if (rv != APR_SUCCESS) {
+ printf("apr_sockaddr_info_get failed %d\n", rv);
+ return 1;
+ }
+
+ rv = apr_socket_create(&ma_mgroup_socket, ma_mgroup_sa->family, SOCK_DGRAM, APR_PROTO_UDP, pool);
+ if (rv != APR_SUCCESS) {
+ printf("apr_socket_create failed %d\n", rv);
+ return 1;
+ }
+ rv = apr_mcast_join(ma_mgroup_socket, ma_mgroup_sa, NULL, NULL);
+ if (rv != APR_SUCCESS) {
+ printf("apr_mcast_join failed %d\n", rv);
+ return 1;
+ }
+
+
+
+ return 0;
+}
Added: trunk/mod_cluster/test/native/Makefile
===================================================================
--- trunk/mod_cluster/test/native/Makefile (rev 0)
+++ trunk/mod_cluster/test/native/Makefile 2009-01-29 14:45:07 UTC (rev 2244)
@@ -0,0 +1,5 @@
+APACHE_BASE = /home/jfclere/APACHE-2.2.9
+
+Advertise: Advertise.c
+ cc -c -I$(APACHE_BASE)/include Advertise.c
+ cc -o Advertise Advertise.o -L$(APACHE_BASE)/lib -lapr-1
15 years, 11 months
JBoss Native SVN: r2243 - trunk/mod_cluster/native/mod_proxy_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-29 08:45:37 -0500 (Thu, 29 Jan 2009)
New Revision: 2243
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Update the table before looking for a balancer.
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-01-29 13:43:23 UTC (rev 2242)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2009-01-29 13:45:37 UTC (rev 2243)
@@ -1489,14 +1489,24 @@
*/
static int proxy_cluster_trans(request_rec *r)
{
- const char *balancer = get_route_balancer(r);
- if (!balancer)
- balancer = get_context_host_balancer(r);
+ const char *balancer;
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, r->server,
"proxy_cluster_trans for %d %s %s uri: %s",
r->proxyreq, r->filename, r->handler, r->uri);
+ balancer = get_route_balancer(r);
+ if (!balancer) {
+ void *sconf = r->server->module_config;
+ proxy_server_conf *conf = (proxy_server_conf *)
+ ap_get_module_config(sconf, &proxy_module);
+ /* May be the balancer has not been created (XXX: use shared memory to find the balancer ...) */
+ update_workers_node(conf, r->pool, r->server);
+ balancer = get_route_balancer(r);
+ }
+ if (!balancer)
+ balancer = get_context_host_balancer(r);
+
if (balancer) {
r->filename = apr_pstrcat(r->pool, "proxy:cluster://", balancer, r->uri, NULL);
r->handler = "proxy-server";
15 years, 11 months
JBoss Native SVN: r2242 - trunk/mod_cluster/test/java/org/jboss/mod_cluster.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-29 08:43:23 -0500 (Thu, 29 Jan 2009)
New Revision: 2242
Modified:
trunk/mod_cluster/test/java/org/jboss/mod_cluster/Client.java
trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestBase.java
Log:
Arrange trace and random sleeps.
Modified: trunk/mod_cluster/test/java/org/jboss/mod_cluster/Client.java
===================================================================
--- trunk/mod_cluster/test/java/org/jboss/mod_cluster/Client.java 2009-01-28 21:28:05 UTC (rev 2241)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/Client.java 2009-01-29 13:43:23 UTC (rev 2242)
@@ -30,6 +30,7 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
+import java.util.Random;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.*;
@@ -49,6 +50,7 @@
private int nbtest = 10;
private int delay = 1000;
+ private Random rand = null;
private boolean checkcookie = true;
private boolean checknode = true;
private boolean success = true;
@@ -169,7 +171,7 @@
httpClient.getState().setCredentials(org.apache.commons.httpclient.auth.AuthScope.ANY, cred);
}
- System.out.println("Connecting to " + URL);
+ // System.out.println("Connecting to " + URL);
Integer connectionTimeout = 40000;
bm.getParams().setParameter("http.socket.timeout", connectionTimeout);
@@ -177,7 +179,7 @@
httpClient.getParams().setParameter("http.socket.timeout", connectionTimeout);
httpClient.getParams().setParameter("http.connection.timeout", connectionTimeout);
if (jsessionid != null) {
- System.out.println("jsessionid: " + jsessionid);
+ // System.out.println("jsessionid: " + jsessionid);
bm.setRequestHeader("Cookie", "JSESSIONID=" + jsessionid);
}
@@ -188,15 +190,13 @@
httpResponseCode = httpClient.executeMethod(gm);
}
- System.out.println("response: " + httpResponseCode);
- System.out.println("response: " + bm.getStatusLine());
if (httpResponseCode == 200) {
Cookie[] cookies = httpClient.getState().getCookies();
- System.out.println( "Cookies: " + cookies);
+ // System.out.println( "Cookies: " + cookies);
if (cookies != null && cookies.length!=0) {
for (int i = 0; i < cookies.length; i++) {
Cookie cookie = cookies[i];
- System.out.println( "Cookie: " + cookie.getName() + ", Value: " + cookie.getValue());
+ // System.out.println( "Cookie: " + cookie.getName() + ", Value: " + cookie.getValue());
if (cookie.getName().equals("JSESSIONID")) {
if (jsessionid == null) {
jsessionid = cookie.getValue();
@@ -207,12 +207,12 @@
bm.releaseConnection();
return 0; // first time ok.
} else {
- System.out.println("cookie second time: " + jsessionid);
if (jsessionid.compareTo(cookie.getValue()) == 0) {
System.out.println("cookie ok");
bm.releaseConnection();
return 0;
} else {
+ System.out.println("cookie \"second\" time: " + cookie.getValue());
System.out.println("cookie changed");
bm.releaseConnection();
if (checkcookie)
@@ -253,7 +253,8 @@
requestedSessionId = null;
}
} else {
- System.out.println("Not 200");
+ System.out.println("response: " + httpResponseCode);
+ System.out.println("response: " + bm.getStatusLine());
success = false;
}
// System.out.println("response:\n" + bm.getResponseBodyAsString(len));
@@ -266,6 +267,8 @@
return httpResponseCode;
}
public void run() {
+ if (rand == null)
+ rand = new Random();
try {
sleep(delay);
} catch (InterruptedException e) {}
@@ -276,11 +279,15 @@
success = false;
return;
}
- sleep((int)(Math.random() * 1000));
+ sleep((int)(rand.nextInt(100) * 10));
} catch (InterruptedException e) {
+ e.printStackTrace();
success = false;
+ return;
} catch (Exception e) {
+ e.printStackTrace();
success = false;
+ return;
}
}
System.out.println("DONE!");
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-28 21:28:05 UTC (rev 2241)
+++ trunk/mod_cluster/test/java/org/jboss/mod_cluster/TestBase.java 2009-01-29 13:43:23 UTC (rev 2242)
@@ -41,7 +41,7 @@
public class TestBase extends TestCase {
- /* Test */
+ /* Test that the sessions are really sticky */
public void testBase() {
boolean clienterror = false;
@@ -96,7 +96,7 @@
// Wait for it.
try {
- client.runit("/ROOT/MyCount", 10, true);
+ client.runit("/ROOT/MyCount", 20, true);
client.start();
client.join();
} catch (Exception ex) {
15 years, 11 months
JBoss Native SVN: r2241 - trunk/mod_cluster/native/advertise.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-01-28 16:28:05 -0500 (Wed, 28 Jan 2009)
New Revision: 2241
Modified:
trunk/mod_cluster/native/advertise/mod_advertise.c
Log:
Add traces.
Modified: trunk/mod_cluster/native/advertise/mod_advertise.c
===================================================================
--- trunk/mod_cluster/native/advertise/mod_advertise.c 2009-01-28 19:33:19 UTC (rev 2240)
+++ trunk/mod_cluster/native/advertise/mod_advertise.c 2009-01-28 21:28:05 UTC (rev 2241)
@@ -330,27 +330,37 @@
}
static apr_status_t ma_group_join(const char *addr, apr_port_t port,
- apr_pool_t *pool)
+ apr_pool_t *pool, server_rec *s)
{
apr_status_t rv;
if ((rv = apr_sockaddr_info_get(&ma_mgroup_sa, addr,
APR_INET, port,
- APR_UNSPEC, pool)) != APR_SUCCESS)
+ APR_UNSPEC, pool)) != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
+ "mod_advertise: ma_group_join apr_sockaddr_info_get failed");
return rv;
+ }
if ((rv = apr_socket_create(&ma_mgroup_socket,
ma_mgroup_sa->family,
SOCK_DGRAM,
APR_PROTO_UDP,
- pool)) != APR_SUCCESS)
+ pool)) != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
+ "mod_advertise: ma_group_join apr_socket_create failed");
return rv;
+ }
if ((rv = apr_mcast_join(ma_mgroup_socket, ma_mgroup_sa,
NULL, NULL)) != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
+ "mod_advertise: ma_group_join apr_mcast_join failed");
apr_socket_close(ma_mgroup_socket);
return rv;
}
if ((rv = apr_mcast_hops(ma_mgroup_socket,
MA_ADVERTISE_HOPS)) != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
+ "mod_advertise: ma_group_join apr_mcast_hops failed");
apr_mcast_leave(ma_mgroup_socket, ma_mgroup_sa,
NULL, NULL);
apr_socket_close(ma_mgroup_socket);
@@ -522,7 +532,7 @@
/* Check if we have advertise set */
if (ma_advertise_mode != ma_advertise_off &&
ma_advertise_adrs) {
- rv = ma_group_join(ma_advertise_adrs, ma_advertise_port, pconf);
+ rv = ma_group_join(ma_advertise_adrs, ma_advertise_port, pconf, s);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
"mod_advertise: multicast join failed for %s:%d.",
15 years, 11 months
JBoss Native SVN: r2240 - trunk/mod_cluster.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2009-01-28 14:33:19 -0500 (Wed, 28 Jan 2009)
New Revision: 2240
Modified:
trunk/mod_cluster/pom.xml
Log:
Refreshed dependencies
Modified: trunk/mod_cluster/pom.xml
===================================================================
--- trunk/mod_cluster/pom.xml 2009-01-28 19:25:07 UTC (rev 2239)
+++ trunk/mod_cluster/pom.xml 2009-01-28 19:33:19 UTC (rev 2240)
@@ -1,5 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
@@ -10,10 +10,11 @@
<groupId>org.jboss.native</groupId>
<artifactId>mod-cluster</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <name />
- <description />
- <url />
+ <name>mod_cluster</name>
+ <description></description>
+ <url>http://jboss.org/mod_cluster</url>
+
<scm>
<connection>scm:svn:https://svn.jboss.org/repos/jbossnative/trunk/mod_cluster</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/labs/labs/jbossbuild/jboss-parent/tag...</developerConnection>
@@ -78,7 +79,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
-
<!-- Unpack requisite build scripts -->
<execution>
<id>unpack-build-scripts</id>
@@ -97,7 +97,6 @@
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
-
<!-- Copy jboss-test JAR -->
<execution>
<id>copy-jboss-test</id>
@@ -125,7 +124,6 @@
<stripVersion>true</stripVersion>
</configuration>
</execution>
-
</executions>
</plugin>
@@ -145,9 +143,7 @@
</executions>
</plugin>
-->
-
</plugins>
-
<pluginManagement>
<plugins>
<plugin>
@@ -157,7 +153,6 @@
</plugin>
</plugins>
</pluginManagement>
-
</build>
<dependencies>
@@ -166,30 +161,21 @@
<artifactId>jboss-ha-server-api</artifactId>
<version>1.1.0.GA</version>
</dependency>
-
<dependency>
<groupId>jboss.web</groupId>
<artifactId>jbossweb</artifactId>
<version>2.1.1.GA</version>
</dependency>
-
<dependency>
<groupId>net.jcip</groupId>
<artifactId>jcip-annotations</artifactId>
<version>1.0</version>
</dependency>
-
<dependency>
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-kernel</artifactId>
- <version>2.0.2.GA</version>
+ <version>2.0.3.GA</version>
</dependency>
-
- <dependency>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- <version>2.0.5.GA</version>
- </dependency>
<!-- For installation in standalone JBoss Web or Tomcat -->
<dependency>
@@ -217,39 +203,62 @@
<artifactId>jboss-test</artifactId>
<version>1.1.3.GA</version>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ <!-- Latest release still uses jboss-server-manager 1.0.0.GA, which still uses AS 5.0.0.CR2 -->
+ <exclusion>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-server-manager</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-server-manager</artifactId>
+ <version>1.0.1.GA</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.naming</groupId>
+ <artifactId>jnp-client</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>org.jboss.naming</groupId>
<artifactId>jnp-client</artifactId>
- <version>5.0.0.SP1</version>
+ <version>5.0.1.GA</version>
<scope>test</scope>
</dependency>
+
+ <!-- Demo dependencies -->
+ <!-- Use provided scope, until demo is moved to separate module -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3</version>
- <scope>test</scope>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
- <scope>test</scope>
+ <scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-server-manager</artifactId>
- <version>1.0.0.GA</version>
- </dependency>
- <dependency>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.9</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>jfree</groupId>
<artifactId>jcommon</artifactId>
<version>1.0.12</version>
+ <scope>provided</scope>
</dependency>
</dependencies>
@@ -282,8 +291,9 @@
<!-- Execute the Test Build -->
<ant antfile="build-test.xml" target="main" />
+ <ant antfile="build-test.xml" target=""/>
<!-- Execute the integration tests that require httpd -->
- <ant antfile="build-test.xml" target="tests-apache-integration" />
+ <!--ant antfile="build-test.xml" target="tests-clustering-unit" /-->
</tasks>
</configuration>
15 years, 11 months
JBoss Native SVN: r2239 - trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric.
by jbossnative-commits@lists.jboss.org
Author: pferraro
Date: 2009-01-28 14:25:07 -0500 (Wed, 28 Jan 2009)
New Revision: 2239
Modified:
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java
trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java
Log:
Relax allowable expected load delta to improve test success rate.
Modified: trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java
===================================================================
--- trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java 2009-01-28 17:05:27 UTC (rev 2238)
+++ trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/ReceiveTrafficLoadMetricTestCase.java 2009-01-28 19:25:07 UTC (rev 2239)
@@ -59,8 +59,8 @@
EasyMock.reset(this.server);
- EasyMock.expect(this.server.getAttribute(this.name1, ReceiveTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(1000L);
- EasyMock.expect(this.server.getAttribute(this.name2, ReceiveTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(2000L);
+ EasyMock.expect(this.server.getAttribute(this.name1, ReceiveTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(10000L);
+ EasyMock.expect(this.server.getAttribute(this.name2, ReceiveTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(20000L);
EasyMock.replay(this.server);
@@ -77,12 +77,12 @@
EasyMock.verify(this.server);
- Assert.assertEquals(6.0, load, 0.5);
+ Assert.assertEquals(60.0, load, 1.0);
EasyMock.reset(this.server);
- EasyMock.expect(this.server.getAttribute(this.name1, ReceiveTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(2000L);
- EasyMock.expect(this.server.getAttribute(this.name2, ReceiveTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(3000L);
+ EasyMock.expect(this.server.getAttribute(this.name1, ReceiveTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(20000L);
+ EasyMock.expect(this.server.getAttribute(this.name2, ReceiveTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(30000L);
EasyMock.replay(this.server);
@@ -97,7 +97,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(4.0, load, 0.5);
+ Assert.assertEquals(40.0, load, 1.0);
EasyMock.reset(this.server);
}
Modified: trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java
===================================================================
--- trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java 2009-01-28 17:05:27 UTC (rev 2238)
+++ trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/RequestCountLoadMetricTestCase.java 2009-01-28 19:25:07 UTC (rev 2239)
@@ -59,8 +59,8 @@
EasyMock.reset(this.server);
- EasyMock.expect(this.server.getAttribute(this.name1, RequestCountLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(1);
- EasyMock.expect(this.server.getAttribute(this.name2, RequestCountLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(2);
+ EasyMock.expect(this.server.getAttribute(this.name1, RequestCountLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(10);
+ EasyMock.expect(this.server.getAttribute(this.name2, RequestCountLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(20);
EasyMock.replay(this.server);
@@ -77,13 +77,13 @@
EasyMock.verify(this.server);
- Assert.assertEquals(6, load, 0.5);
+ Assert.assertEquals(60.0, load, 1.0);
EasyMock.reset(this.server);
// Test incremental load
- EasyMock.expect(this.server.getAttribute(this.name1, RequestCountLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(2);
- EasyMock.expect(this.server.getAttribute(this.name2, RequestCountLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(3);
+ EasyMock.expect(this.server.getAttribute(this.name1, RequestCountLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(20);
+ EasyMock.expect(this.server.getAttribute(this.name2, RequestCountLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(30);
EasyMock.replay(this.server);
@@ -98,7 +98,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(4, load, 0.5);
+ Assert.assertEquals(40.0, load, 1.0);
EasyMock.reset(this.server);
}
Modified: trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java
===================================================================
--- trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java 2009-01-28 17:05:27 UTC (rev 2238)
+++ trunk/mod_cluster/src/test/java/org/jboss/modcluster/load/metric/SendTrafficLoadMetricTestCase.java 2009-01-28 19:25:07 UTC (rev 2239)
@@ -59,8 +59,8 @@
EasyMock.reset(this.server);
- EasyMock.expect(this.server.getAttribute(this.name1, SendTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(1000L);
- EasyMock.expect(this.server.getAttribute(this.name2, SendTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(2000L);
+ EasyMock.expect(this.server.getAttribute(this.name1, SendTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(10000L);
+ EasyMock.expect(this.server.getAttribute(this.name2, SendTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(20000L);
EasyMock.replay(this.server);
@@ -77,12 +77,12 @@
EasyMock.verify(this.server);
- Assert.assertEquals(6.0, load, 0.5);
+ Assert.assertEquals(60.0, load, 1.0);
EasyMock.reset(this.server);
- EasyMock.expect(this.server.getAttribute(this.name1, SendTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(2000L);
- EasyMock.expect(this.server.getAttribute(this.name2, SendTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(3000L);
+ EasyMock.expect(this.server.getAttribute(this.name1, SendTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(20000L);
+ EasyMock.expect(this.server.getAttribute(this.name2, SendTrafficLoadMetric.DEFAULT_ATTRIBUTE)).andReturn(30000L);
EasyMock.replay(this.server);
@@ -97,7 +97,7 @@
EasyMock.verify(this.server);
- Assert.assertEquals(4.0, load, 0.5);
+ Assert.assertEquals(40.0, load, 1.0);
EasyMock.reset(this.server);
}
15 years, 11 months