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

Manik Surtani msurtani at jboss.com
Tue Nov 28 23:42:36 EST 2006


  User: msurtani
  Date: 06/11/28 23:42:36

  Added:       tests/functional/org/jboss/cache  JGroupsConfigTest.java
  Log:
  JBCACHE-813
  
  Revision  Changes    Path
  1.1      date: 2006/11/29 04:42:36;  author: msurtani;  state: Exp;JBossCache/tests/functional/org/jboss/cache/JGroupsConfigTest.java
  
  Index: JGroupsConfigTest.java
  ===================================================================
  package org.jboss.cache;
  
  import junit.framework.TestCase;
  
  public class JGroupsConfigTest extends TestCase
  {
     private TreeCache c;
  
     protected void tearDown()
     {
        if (c != null)
        {
           c.stop();
           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.getConfiguration().setClusterConfig(props);
        c.getConfiguration().setCacheMode("REPL_SYNC");
        c.start();
     }
  
     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