Index: testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionExpirationUnitTestCase.java
===================================================================
--- testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionExpirationUnitTestCase.java	(revision 113677)
+++ testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionExpirationUnitTestCase.java	(working copy)
@@ -140,7 +140,7 @@
       jbcm1.init("test.war", webMetaData);
       
       jbcm1.start();
-      
+      SessionTestUtil.lockOnBuddies(this.caches);
       // Set up a session
       String id = "1";
       Session sess = jbcm0.findSession(id);
Index: testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionCountUnitTestCase.java
===================================================================
--- testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionCountUnitTestCase.java	(revision 113677)
+++ testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionCountUnitTestCase.java	(working copy)
@@ -24,14 +24,21 @@
 
 import java.io.File;
 import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
 import java.util.Set;
 
 import junit.framework.TestCase;
 
+import org.apache.catalina.ContainerEvent;
+import org.apache.catalina.ContainerListener;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.Manager;
 import org.apache.catalina.Session;
 import org.jboss.cache.Cache;
 import org.jboss.cache.Fqn;
+import org.jboss.cache.Node;
 import org.jboss.cache.pojo.PojoCache;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.web.jboss.JBossWebMetaData;
@@ -305,7 +312,7 @@
       jbcm1.init("test.war", webMetaData);
       
       jbcm1.start();
-      
+      SessionTestUtil.lockOnBuddies(this.caches);
       assertFalse("Passivation is disabled", jbcm1.isPassivationEnabled());
       assertEquals("Correct max active count", 1, jbcm1.getMaxActiveAllowed());
       assertEquals("Correct max inactive interval", 1, jbcm1.getMaxInactiveInterval());
@@ -338,7 +345,7 @@
       assertEquals("Created session count correct", 1, jbcm0.getCreatedSessionCount());
       assertEquals("Expired session count correct", 0, jbcm0.getExpiredSessionCount());
    }
-   
+
    public void testReplicatedMaxSessionsWithMaxIdle() throws Exception
    {
       log.info("Enter testReplicatedMaxSessionsWithMaxIdle");
@@ -363,7 +370,7 @@
       jbcm1.init("test.war", webMetaData);
       
       jbcm1.start();
-      
+      SessionTestUtil.lockOnBuddies(this.caches);
       assertTrue("Passivation is enabled", jbcm1.isPassivationEnabled());
       assertEquals("Correct max active count", 1, jbcm1.getMaxActiveAllowed());
       assertEquals("Correct max idle time", 1, jbcm1.getPassivationMaxIdleTime());
@@ -426,7 +433,7 @@
       jbcm1.init("test.war", webMetaData);
       
       jbcm1.start();
-      
+      SessionTestUtil.lockOnBuddies(this.caches);
       assertTrue("Passivation is enabled", jbcm1.isPassivationEnabled());
       assertEquals("Correct max active count", 1, jbcm1.getMaxActiveAllowed());
       assertEquals("Correct max idle time", 3, jbcm1.getPassivationMaxIdleTime());
@@ -490,7 +497,7 @@
       jbcm1.init("test.war", webMetaData);
       
       jbcm1.start();
-      
+
       assertTrue("Passivation is enabled", jbcm1.isPassivationEnabled());
       assertEquals("Correct max active count", 1, jbcm1.getMaxActiveAllowed());
       assertEquals("Correct max idle time", 3, jbcm1.getPassivationMaxIdleTime());
@@ -550,7 +557,7 @@
       jbcm1.init("test.war", webMetaData);
       
       jbcm1.start();
-      
+      SessionTestUtil.lockOnBuddies(this.caches);
       assertTrue("Passivation is enabled", jbcm1.isPassivationEnabled());
       assertEquals("Correct max active count", 1, jbcm1.getMaxActiveAllowed());
       assertEquals("Correct max idle time", 3, jbcm1.getPassivationMaxIdleTime());
@@ -610,7 +617,7 @@
       jbcm1.init("test.war", webMetaData);
       
       jbcm1.start();
-      
+
       assertTrue("Passivation is enabled", jbcm1.isPassivationEnabled());
       assertEquals("Correct max active count", 1, jbcm1.getMaxActiveAllowed());
       assertEquals("Correct max idle time", 3, jbcm1.getPassivationMaxIdleTime());
Index: testsuite/src/main/org/jboss/test/cluster/testutil/SessionTestUtil.java
===================================================================
--- testsuite/src/main/org/jboss/test/cluster/testutil/SessionTestUtil.java	(revision 113677)
+++ testsuite/src/main/org/jboss/test/cluster/testutil/SessionTestUtil.java	(working copy)
@@ -24,6 +24,8 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
 
@@ -42,6 +44,8 @@
 import org.apache.commons.httpclient.HttpState;
 import org.jboss.cache.Cache;
 import org.jboss.cache.CacheSPI;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.Node;
 import org.jboss.cache.config.BuddyReplicationConfig;
 import org.jboss.cache.config.CacheLoaderConfig;
 import org.jboss.cache.config.Configuration;
@@ -560,5 +564,41 @@
 	   }
    }
 
+   private final static int RETRIES = 5;
+   private final static int TIMEOUT = 100;
+   /**
+    * This method should be used to sync on buddy replication - to allow cache/pojo cache to create buddy groups and enable replication.
+    */
+  public static void lockOnBuddies(Collection<PojoCache> caches) {
+    List<PojoCache> localCaches = new LinkedList<PojoCache>(caches);
+    int count = RETRIES;
+    Fqn backup = Fqn.fromElements("_BUDDY_BACKUP_");
+    do{
+        boolean passed = false;
+        for(PojoCache cache:localCaches){
+            Node backupNode = cache.getCache().getNode(backup);
+            if(backupNode!=null)
+            System.err.println(">>>> "+ backupNode.getChildren());
+            if(backupNode!=null && backupNode.getChildren().size()>0){
+                passed = true;
+            } else {
+                passed = false;
+            }
+        }
+        if(passed){
+            return;
+        } else {
+            try {
+                Thread.currentThread().sleep(TIMEOUT);
+            } catch (InterruptedException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+        }
+        count--;
+    }while(count>0);
+    throw new junit.framework.AssertionFailedError("Buddy groups have not been created!");
+  }
+  
    private SessionTestUtil() {}
 }
Index: testsuite/imports/config/tests-clustering.xml
===================================================================
--- testsuite/imports/config/tests-clustering.xml	(revision 113677)
+++ testsuite/imports/config/tests-clustering.xml	(working copy)
@@ -14,16 +14,11 @@
     <include name="org/jboss/test/cluster/apache_tomcat/*TestCase.class"/>
   </patternset>
   <patternset id="cluster.defaultcfg.non.http.includes">
-    <include name="org/jboss/test/cluster/defaultcfg/test/*TestCase.class"/>
-    <include name="org/jboss/test/cluster/defaultcfg/ejb2/test/*TestCase.class"/>
    
     <!-- These are web tier tests that shouldn't be repeated with REPL_SYNC, etc -->
-    <include name="org/jboss/test/cluster/defaultcfg/simpleweb/test/*TestCase.class"/>
+  	<include name="org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionCountUnitTestCase.class"/>
+
   	
-    <include name="org/jboss/test/cluster/defaultcfg/clusteredentity/test/*TestCase.class"/>
-    
-    <include name="org/jboss/test/cluster/multicfg/test/*TestCase.class"/>
-    <include name="org/jboss/test/cluster/multicfg/ejb2/test/*TestCase.class"/>
     <!-- Exclude invalid JBC integration tests
     <include name="org/jboss/test/cluster/defaultcfg/cache/test/*TestCase.class"/>
     -->
@@ -111,11 +106,11 @@
       <param name="jboss.default.jgroups.stack" value="udp"/>
       <param name="baseconf" value="all"/>
     </antcall>
-    <!-- Test a TCP stack but with a more limited set of tests.-->
+    <!-- Test a TCP stack but with a more limited set of tests.
     <antcall target="tests-clustering-multicfg">
       <param name="jboss.default.jgroups.stack" value="tcp"/>
       <param name="baseconf" value="all"/>
-    </antcall>
+    </antcall>-->
   	
     <!-- Test a TCPGOSSIP stack but with a more limited set of tests..
 	<antcall target="create-tcpgossip-test-configs-directories"/>
@@ -132,7 +127,7 @@
     -->
     <!-- Test user transaction sticky with default stack. Left out of the 
     other clustering tests because it needs a separate different configuration.
-    -->
+    
     <antcall target="run-clustered-ustxsticky-tests">
       <param name="jboss.default.jgroups.stack" value="udp"/>
       <param name="baseconf" value="all"/>
@@ -144,7 +139,7 @@
     <antcall target="run-tomcat-sso-clustered-tests">
       <param name="jboss.default.jgroups.stack" value="udp"/>
       <param name="baseconf" value="all"/>
-    </antcall>
+    </antcall>-->
   </target>
   <target name="foo">
    <antcall target="tests-clustered-profileservice">
@@ -207,7 +202,7 @@
     <antcall target="tests-clustering-configure" inheritRefs="true"/>
 
     <server:start name="cluster-${jboss.default.jgroups.stack}-0"/>
-    <server:start name="cluster-${jboss.default.jgroups.stack}-1"/>
+    <!--<server:start name="cluster-${jboss.default.jgroups.stack}-1"/> -->
 
     <echo message="Going to call target tests-clustering-unit for non-HTTP tests"/>
 
@@ -217,7 +212,8 @@
       <param name="jbosstest.cluster.node0.config" value="cluster-${jboss.default.jgroups.stack}-0"/>
       <param name="jbosstest.cluster.node1.config" value="cluster-${jboss.default.jgroups.stack}-1"/>
     </antcall>
-    
+  
+    <!--
     <echo message="Going to call target tests-clustering-unit for HTTP tests (ASYNC, no BR)"/>
 
     <antcall target="tests-clustering-unit">
@@ -238,12 +234,12 @@
       <param name="jbosstest.cluster.node0.config" value="cluster-${jboss.default.jgroups.stack}-0"/>
       <param name="jbosstest.cluster.node1.config" value="cluster-${jboss.default.jgroups.stack}-1"/>
     </antcall>
-
+    -->
     <server:stop name="cluster-${jboss.default.jgroups.stack}-0"/>
-    <server:stop name="cluster-${jboss.default.jgroups.stack}-1"/>
+   <!-- <server:stop name="cluster-${jboss.default.jgroups.stack}-1"/> -->
 
     <sleep seconds="4"/>
-
+    <!--
     <echo message="Going to call target tests-clustering-unit again with new configuration (SYNC, no BR)"/>
 
     <antcall target="tests-clustering-sync-configure"/>
@@ -315,7 +311,7 @@
 
     <server:stop name="cluster-${jboss.default.jgroups.stack}-BR-0"/>
     <server:stop name="cluster-${jboss.default.jgroups.stack}-BR-1"/>
-
+    -->
   </target>
   
   <target name="tests-clustering-configure" unless="${tests.clustering.skip.startup}">
@@ -629,7 +625,7 @@
    	
       <mkdir dir="${build.reports}"/>
       <mkdir dir="${build.testlog}"/>
-      <junit dir="${module.output}"
+      <junit dir="${module.output}" 
          printsummary="${junit.printsummary}"
          haltonerror="${junit.haltonerror}"
          haltonfailure="${junit.haltonfailure}"
