[infinispan-commits] Infinispan SVN: r355 - in trunk/core/src/test: resources/stacks and 1 other directory.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Thu May 28 09:03:19 EDT 2009
Author: vblagojevic at jboss.com
Date: 2009-05-28 09:03:19 -0400 (Thu, 28 May 2009)
New Revision: 355
Modified:
trunk/core/src/test/java/org/infinispan/test/fwk/JGroupsConfigBuilder.java
trunk/core/src/test/resources/stacks/tcp.xml
trunk/core/src/test/resources/stacks/udp.xml
Log:
both 2.8 and 2.7 version of JGroups run correctly in unit tests
Modified: trunk/core/src/test/java/org/infinispan/test/fwk/JGroupsConfigBuilder.java
===================================================================
--- trunk/core/src/test/java/org/infinispan/test/fwk/JGroupsConfigBuilder.java 2009-05-28 12:49:23 UTC (rev 354)
+++ trunk/core/src/test/java/org/infinispan/test/fwk/JGroupsConfigBuilder.java 2009-05-28 13:03:19 UTC (rev 355)
@@ -2,6 +2,7 @@
import org.infinispan.config.parsing.JGroupsStackParser;
import org.infinispan.config.parsing.XmlConfigHelper;
+import org.jgroups.util.Util;
import org.w3c.dom.Element;
import java.io.BufferedReader;
@@ -22,6 +23,7 @@
public static final String JGROUPS_STACK;
+ private static String bind_addr="127.0.0.1";
private static String tcpConfig;
private static String udpConfig;
@@ -66,6 +68,11 @@
static {
JGROUPS_STACK = System.getProperties().getProperty("jgroups.stack", "tcp");
System.out.println("IN USE JGROUPS STACK = " + JGROUPS_STACK);
+
+ try {
+ bind_addr = Util.getBindAddress(null).getHostAddress();
+ } catch (Exception e) {
+ }
}
public static String getJGroupsConfig() {
@@ -89,11 +96,11 @@
throw new IllegalStateException();
}
- if (result.indexOf("TCPGOSSIP") < 0) //onluy adjust for TCPPING
+ if (result.indexOf("TCPGOSSIP") < 0) // onluy adjust for TCPPING
{
m = TCP_INITIAL_HOST.matcher(result);
if (m.find()) {
- result = m.replaceFirst("initial_hosts=" + "127.0.0.1[" + newStartPort + "]");
+ result = m.replaceFirst("initial_hosts=" + bind_addr + "[" + newStartPort + "]");
}
}
return result;
Modified: trunk/core/src/test/resources/stacks/tcp.xml
===================================================================
--- trunk/core/src/test/resources/stacks/tcp.xml 2009-05-28 12:49:23 UTC (rev 354)
+++ trunk/core/src/test/resources/stacks/tcp.xml 2009-05-28 13:03:19 UTC (rev 355)
@@ -1,59 +1,62 @@
-<config>
- <TCP bind_port="7800"
- port_range="10"
- loopback="true"
- recv_buf_size="20000000"
- send_buf_size="640000"
- discard_incompatible_packets="true"
- max_bundle_size="64000"
- max_bundle_timeout="30"
- enable_bundling="false"
- use_send_queues="false"
- sock_conn_timeout="300"
- skip_suspected_members="true"
- thread_pool.enabled="true"
- thread_pool.min_threads="1"
- thread_pool.max_threads="25"
- thread_pool.keep_alive_time="5000"
- thread_pool.queue_enabled="false"
- thread_pool.queue_max_size="100"
- thread_pool.rejection_policy="run"
+<config xmlns="urn:org:jgroups"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:org:jgroups file:schema/JGroups-2.8.xsd">
+ <TCP bind_port="7800"
+ loopback="true"
+ port_range="30"
+ recv_buf_size="20000000"
+ send_buf_size="640000"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ enable_bundling="false"
+ use_send_queues="false"
+ sock_conn_timeout="300"
+ skip_suspected_members="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="1"
+ thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="false"
+ thread_pool.queue_max_size="100"
+ thread_pool.rejection_policy="run"
- oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
- oob_thread_pool.max_threads="8"
- oob_thread_pool.keep_alive_time="5000"
- oob_thread_pool.queue_enabled="false"
- oob_thread_pool.queue_max_size="100"
- oob_thread_pool.rejection_policy="run"/>
-
- <TCPPING timeout="3000"
- initial_hosts="127.0.0.1[7800]"
- port_range="1"
- num_initial_members="1"/>
- <MERGE2 max_interval="100000"
- min_interval="20000"/>
- <FD_SOCK/>
- <!--
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="8"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="run"/>
+
+ <TCPPING timeout="3000"
+ initial_hosts="localhost[7800],localhost[7801]}"
+ port_range="1"
+ num_initial_members="3"/>
+ <MERGE2 max_interval="30000"
+ min_interval="10000"/>
+ <FD_SOCK/>
+ <!--
Note that this is an atypically short timeout and a small number of retries
configured this way to speed up unit testing, since we know all nodes run in the same JVM
and hence failure detections will be very quick.
- -->
- <FD timeout="1000" max_tries="5" shun="true"/>
- <VERIFY_SUSPECT timeout="1500"/>
- <BARRIER/>
- <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
- retransmit_timeout="300,600,1200,2400,4800"
- discard_delivered_msgs="true"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
- max_bytes="400000"/>
- <VIEW_SYNC avg_send_interval="60000"/>
- <pbcast.GMS print_local_addr="false" join_timeout="3000" shun="true"
- view_bundling="true"/>
- <FC max_credits="2000000"
- min_threshold="0.10"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER/>
- <!-- <pbcast.STATE_TRANSFER/> -->
- <pbcast.FLUSH timeout="0"/>
+ -->
+ <FD timeout="1000" max_tries="3" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500" />
+ <pbcast.NAKACK
+ use_mcast_xmit="false" gc_lag="0"
+ retransmit_timeout="300,600,1200,2400,4800"
+ discard_delivered_msgs="false"/>
+ <UNICAST timeout="300,600,1200" />
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="false" join_timeout="7000"
+ shun="false" view_bundling="true"/>
+ <FC max_credits="2000000"
+ min_threshold="0.10"/>
+ <FRAG2 frag_size="60000" />
+ <pbcast.STREAMING_STATE_TRANSFER/>
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
</config>
Modified: trunk/core/src/test/resources/stacks/udp.xml
===================================================================
--- trunk/core/src/test/resources/stacks/udp.xml 2009-05-28 12:49:23 UTC (rev 354)
+++ trunk/core/src/test/resources/stacks/udp.xml 2009-05-28 13:03:19 UTC (rev 355)
@@ -1,63 +1,64 @@
-<config>
- <UDP mcast_addr="228.10.10.10"
- mcast_port="45588"
- tos="8"
- ucast_recv_buf_size="20000000"
- ucast_send_buf_size="640000"
- mcast_recv_buf_size="25000000"
- mcast_send_buf_size="640000"
- loopback="false"
- discard_incompatible_packets="true"
- max_bundle_size="64000"
- max_bundle_timeout="30"
- use_incoming_packet_handler="true"
- ip_ttl="2"
- enable_bundling="false"
- enable_diagnostics="true"
+<config xmlns="urn:org:jgroups"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:org:jgroups file:schema/JGroups-2.8.xsd">
+ <UDP
+ mcast_addr="${jgroups.udp.mcast_addr:228.10.10.10}"
+ mcast_port="${jgroups.udp.mcast_port:45588}"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ ip_ttl="${jgroups.udp.ip_ttl:2}"
+ enable_bundling="true"
+ enable_diagnostics="true"
+
+ thread_naming_pattern="pl"
- use_concurrent_stack="true"
+ thread_pool.enabled="true"
+ thread_pool.min_threads="2"
+ thread_pool.max_threads="8"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="false"
+ thread_pool.queue_max_size="100"
+ thread_pool.rejection_policy="Run"
- thread_naming_pattern="pl"
+ oob_thread_pool.enabled="true"
+ oob_thread_pool.min_threads="1"
+ oob_thread_pool.max_threads="8"
+ oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false"
+ oob_thread_pool.queue_max_size="100"
+ oob_thread_pool.rejection_policy="Run"/>
- thread_pool.enabled="true"
- thread_pool.min_threads="1"
- thread_pool.max_threads="25"
- thread_pool.keep_alive_time="30000"
- thread_pool.queue_enabled="false"
- thread_pool.queue_max_size="100"
- thread_pool.rejection_policy="Run"
-
- oob_thread_pool.enabled="true"
- oob_thread_pool.min_threads="1"
- oob_thread_pool.max_threads="4"
- oob_thread_pool.keep_alive_time="10000"
- oob_thread_pool.queue_enabled="false"
- oob_thread_pool.queue_max_size="10"
- oob_thread_pool.rejection_policy="Run"/>
-
- <PING timeout="2000" num_initial_members="3"/>
- <MERGE2 max_interval="30000" min_interval="10000"/>
- <FD_SOCK/>
- <!--
+ <PING timeout="1000" num_initial_members="3"/>
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <!--
Note that this is an atypically short timeout and a small number of retries
configured this way to speed up unit testing, since we know all nodes run in the same JVM
and hence failure detections will be very quick.
- -->
- <FD timeout="1000" max_tries="2" shun="true"/>
- <VERIFY_SUSPECT timeout="250"/>
- <!-- this is a more typical configuration of FD and VERIFY_SUSPECT-->
- <!--<FD timeout="10000" max_tries="5" shun="true"/>-->
- <!--<VERIFY_SUSPECT timeout="1500"/>-->
- <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0"
- retransmit_timeout="300,600,900,1200"
- discard_delivered_msgs="true"/>
- <UNICAST timeout="300,600,900,1200"/>
- <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
- max_bytes="400000"/>
- <pbcast.GMS print_local_addr="false" join_timeout="1000" shun="false"
- view_bundling="true" view_ack_collection_timeout="1000"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER/>
- <!-- <pbcast.STATE_TRANSFER/> -->
- <pbcast.FLUSH timeout="0"/>
+ -->
+ <FD timeout="1000" max_tries="2" shun="true"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK use_stats_for_retransmission="false"
+ exponential_backoff="150"
+ use_mcast_xmit="true" gc_lag="0"
+ retransmit_timeout="50,300,600,1200"
+ discard_delivered_msgs="false"/>
+ <UNICAST timeout="300,600,1200"/>
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="400000"/>
+ <pbcast.GMS print_local_addr="false" join_timeout="3000"
+ shun="false"
+ view_bundling="true"/>
+ <FC max_credits="500000" min_threshold="0.20"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER />
+ <!-- <pbcast.STATE_TRANSFER/> -->
+ <pbcast.FLUSH timeout="0"/>
</config>
More information about the infinispan-commits
mailing list