[jboss-cvs] JBossCache/tests/functional/org/jboss/cache ...

Manik Surtani msurtani at jboss.com
Tue Nov 28 23:43:02 EST 2006


  User: msurtani
  Date: 06/11/28 23:43:02

  Added:       tests/functional/org/jboss/cache  Tag:
                        Branch_JBossCache_1_4_0 JGroupsConfigTest.java
  Log:
  JBCACHE-813
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +57 -0     JBossCache/tests/functional/org/jboss/cache/JGroupsConfigTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: JGroupsConfigTest.java
  ===================================================================
  RCS file: JGroupsConfigTest.java
  diff -N JGroupsConfigTest.java
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ JGroupsConfigTest.java	29 Nov 2006 04:43:02 -0000	1.1.2.2
  @@ -0,0 +1,57 @@
  +package org.jboss.cache;
  +
  +import junit.framework.TestCase;
  +
  +public class JGroupsConfigTest extends TestCase
  +{
  +   private TreeCache c;
  +
  +   protected void tearDown()
  +   {
  +      if (c != null)
  +      {
  +         c.stopService();
  +         c = null;
  +      }
  +   }
  +   
  +   private void startCache(String TPString) throws Exception
  +   {
  +      c = new TreeCache();
  +      String props = TPString + ":" +
  +              "PING(timeout=1000;num_initial_members=2):" +
  +              "MERGE2(min_interval=5000;max_interval=10000):" +
  +              "FD_SOCK:" +
  +              "VERIFY_SUSPECT(timeout=1500):" +
  +              "pbcast.NAKACK(gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800):" +
  +              "UNICAST(timeout=600,1200,2400,4800):" +
  +              "pbcast.STABLE(desired_avg_gossip=20000):" +
  +              "FRAG(frag_size=8192;down_thread=false;up_thread=false):" +
  +              "pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;" +
  +              "shun=false;print_local_addr=true):" +
  +              "pbcast.STATE_TRANSFER";
  +
  +      c.setClusterProperties(props);
  +      c.setCacheMode("REPL_SYNC");
  +      c.startService();
  +   }
  +
  +   public void testUDPStack() throws Exception
  +   {
  +      startCache("UDP()");
  +      assertFalse(c.useTcpWorkaround());
  +   }
  +
  +   public void testTCPStack() throws Exception
  +   {
  +      startCache("TCP()");
  +      assertTrue(c.useTcpWorkaround());
  +   }
  +
  +   public void testTCPNIOStack() throws Exception
  +   {
  +      startCache("TCP_NIO()");
  +      assertTrue(c.useTcpWorkaround());
  +   }
  +
  +}
  
  
  



More information about the jboss-cvs-commits mailing list