geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject [01/14] incubator-geode git commit: jgroups source is now removed from asf branch GEODE-77 and is a downloaded dependency. Able to start/stop a locator and a server via gfsh but there is no HA or authentication in the membership system.
Date Mon, 27 Jul 2015 20:27:45 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-77 [created] d2a942e8e


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
index bb85cd4..35ce32a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
@@ -7,9 +7,8 @@
  */
 package com.gemstone.gemfire.internal.i18n;
 
-import com.gemstone.gemfire.i18n.StringIdImpl;
+import com.gemstone.gemfire.i18n.StringId;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import com.gemstone.org.jgroups.util.StringId;
 
 import junit.framework.TestCase;
 
@@ -32,14 +31,14 @@ public class BasicI18nJUnitTest extends TestCase {
   private static final Locale DEFAULT_LOCALE = Locale.getDefault();
   //static final Class DEFAULT_RESOURCEBUNDLE = StringIdResourceBundle_ja.class;
   //static final Class JAPAN_RESOURCEBUNDLE = StringIdResourceBundle_ja.class;
-  private static final StringIdImpl messageId
-         = (StringIdImpl)LocalizedStrings.TESTING_THIS_IS_A_TEST_MESSAGE;
+  private static final StringId messageId
+         = (StringId)LocalizedStrings.TESTING_THIS_IS_A_TEST_MESSAGE;
   private static final String englishMessage = "This is a test message.";
   private static final String japaneseMessage = "msgID " + messageId.id + ": " + "これはテストメッセージである。";
 
   private static final Integer messageArg = new Integer(1);
-  private static final StringIdImpl messageIdWithArg
-         = (StringIdImpl)LocalizedStrings.TESTING_THIS_MESSAGE_HAS_0_MEMBERS;
+  private static final StringId messageIdWithArg
+         = (StringId)LocalizedStrings.TESTING_THIS_MESSAGE_HAS_0_MEMBERS;
   private static final String englishMessageWithArg = "Please ignore: This message has 1 members.";
   private static final String japaneseMessageWithArg
          = "msgID " + messageIdWithArg.id + ": Please ignore: このメッセージに 1 メンバーがある。";
@@ -96,7 +95,7 @@ public class BasicI18nJUnitTest extends TestCase {
    * us to not expose them to customers.
    */
   private Locale getCurrentLocale() {
-    Class<?> c = StringIdImpl.class;
+    Class<?> c = StringId.class;
     Locale locale = null;
     try {
       Method m = c.getDeclaredMethod("getCurrentLocale");
@@ -114,7 +113,7 @@ public class BasicI18nJUnitTest extends TestCase {
    *  us to not expose them to customers.
    */
   private AbstractStringIdResourceBundle getActiveResourceBundle() {
-    Class<?> c = StringIdImpl.class;
+    Class<?> c = StringId.class;
     AbstractStringIdResourceBundle rb = null;
     try {
       Method m = c.getDeclaredMethod("getActiveResourceBundle");
@@ -136,7 +135,7 @@ public class BasicI18nJUnitTest extends TestCase {
    * </code>
    */
   private void verifyStringsAreProperlyEscaped(Locale loc) {
-    StringIdImpl.setLocale(loc);
+    StringId.setLocale(loc);
 
     final Set<StringId> misquoted = new HashSet<StringId>();
 
@@ -152,7 +151,7 @@ public class BasicI18nJUnitTest extends TestCase {
       String altered = raw.replaceAll("''", "'");
       altered = altered.replaceAll("\\{([0-9]+)[^\\}]*\\}", "$1");
       if (!rb.usingRawMode()) {
-        altered = "msgID " + ((StringIdImpl)instance).id + ": " + altered;
+        altered = "msgID " + ((StringId)instance).id + ": " + altered;
       }
       String formatted = null;
       try {
@@ -160,7 +159,7 @@ public class BasicI18nJUnitTest extends TestCase {
       } catch(IllegalArgumentException iae) {
         String testName = this.getClass().getName().replaceAll("\\.", "/")
                           + ".class";
-        String exMsg = "Improper message id=" + ((StringIdImpl)instance).id + "\n"
+        String exMsg = "Improper message id=" + ((StringId)instance).id + "\n"
                + "Usually this is caused by an unmatched or nested \"{\"\n"
                + "Examples:\t\"{0]\" or \"{ {0} }\"\n"
                + "This is just the first failure, it is in your interest"
@@ -185,7 +184,7 @@ public class BasicI18nJUnitTest extends TestCase {
       for(StringId i : misquoted) {
         err.append("\n")
            .append("StringId id=")
-           .append(((StringIdImpl)i).id)
+           .append(((StringId)i).id)
            .append(" : text=\"")
            .append(i.getRawText())
            .append("\"");
@@ -197,7 +196,7 @@ public class BasicI18nJUnitTest extends TestCase {
   @Override
   public void tearDown() {
     //reset to the original
-    StringIdImpl.setLocale(DEFAULT_LOCALE);
+    StringId.setLocale(DEFAULT_LOCALE);
   }
 
   public void testDefaults() {
@@ -215,15 +214,15 @@ public class BasicI18nJUnitTest extends TestCase {
   public void testSetLocale() {
     //Verify we are starting in a known state
     assertTrue(DEFAULT_LOCALE.equals(getCurrentLocale()));
-    StringIdImpl.setLocale(Locale.FRANCE);
+    StringId.setLocale(Locale.FRANCE);
     assertTrue(Locale.FRANCE.equals(getCurrentLocale()));
 
-    StringIdImpl.setLocale(Locale.FRANCE);
+    StringId.setLocale(Locale.FRANCE);
     assertTrue(Locale.FRANCE.equals(getCurrentLocale()));
     StringId s = LocalizedStrings.UNSUPPORTED_AT_THIS_TIME;
     assertTrue(s.toString().equals(s.toLocalizedString()));
 
-    StringIdImpl.setLocale(Locale.JAPAN);
+    StringId.setLocale(Locale.JAPAN);
     assertTrue(Locale.JAPAN.equals(getCurrentLocale()));
     if (getActiveResourceBundle().usingRawMode()) {
       assertTrue(s.toString().equals(s.toLocalizedString()));
@@ -269,7 +268,7 @@ public class BasicI18nJUnitTest extends TestCase {
      * English resource bundle.  The second assert will fail if this isn't the
      * case.
      **/
-    StringIdImpl.setLocale(Locale.FRANCE);
+    StringId.setLocale(Locale.FRANCE);
     assertTrue(Locale.FRANCE.equals(getCurrentLocale()));
     assertEquals(messageId.toString(), englishMessage);
     assertEquals(messageId.toLocalizedString(), englishMessage);
@@ -289,7 +288,7 @@ public class BasicI18nJUnitTest extends TestCase {
      * We no longer bundle the JAPAN localized strings with the product
      * so the following now expects english msgs.
      */
-    StringIdImpl.setLocale(Locale.JAPAN);
+    StringId.setLocale(Locale.JAPAN);
     assertTrue(Locale.JAPAN.equals(getCurrentLocale()));
     assertEquals(messageId.toString(), englishMessage);
     if (getActiveResourceBundle().usingRawMode()) {
@@ -326,12 +325,12 @@ public class BasicI18nJUnitTest extends TestCase {
   }
 
   public void testEnglishLanguage() {
-    StringIdImpl.setLocale(Locale.ENGLISH);
+    StringId.setLocale(Locale.ENGLISH);
     assertEquals(messageId.toLocalizedString(), englishMessage);
   }
 
   public void testJapaneseLanguage() {
-    StringIdImpl.setLocale(Locale.JAPANESE);
+    StringId.setLocale(Locale.JAPANESE);
     if (getActiveResourceBundle().usingRawMode()) {
       assertEquals(messageId.toLocalizedString(), englishMessage);
     } else {
@@ -340,10 +339,10 @@ public class BasicI18nJUnitTest extends TestCase {
   }
 
   public void testAlternateEnglishCountries() {
-    StringIdImpl.setLocale(Locale.CANADA);
+    StringId.setLocale(Locale.CANADA);
     assertEquals(messageId.toLocalizedString(), englishMessage);
 
-    StringIdImpl.setLocale(Locale.UK);
+    StringId.setLocale(Locale.UK);
     assertEquals(messageId.toLocalizedString(), englishMessage);
   }
 
@@ -359,10 +358,10 @@ public class BasicI18nJUnitTest extends TestCase {
     final Set<StringId> duplicates = new HashSet<StringId>();
 
     for(StringId instance : getAllStringIds()) {
-      boolean isUnique = allStringIds.add(((StringIdImpl)instance).id);
+      boolean isUnique = allStringIds.add(((StringId)instance).id);
       //Duplicate ids between 0-1023 are allowed since they are duplicated
       //between String bundles to minimize compiler dependencies.
-      if((! isUnique) && ((StringIdImpl)instance).id >= 1024) {
+      if((! isUnique) && ((StringId)instance).id >= 1024) {
          boolean status = duplicates.add(instance);
          assertTrue("Failed to add " + instance + "to the list of"
                     + " duplicates because of duplicate duplicates",
@@ -374,7 +373,7 @@ public class BasicI18nJUnitTest extends TestCase {
       err.append("The following duplicate StringIds were found:");
       for(StringId i : duplicates) {
         err.append("\n")
-           .append(((StringIdImpl)i).id)
+           .append(((StringId)i).id)
            .append(" : ")
            .append(i.getRawText());
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LocalizedMessageJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LocalizedMessageJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LocalizedMessageJUnitTest.java
index f12f229..ecb53ee 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LocalizedMessageJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LocalizedMessageJUnitTest.java
@@ -8,9 +8,8 @@ import static org.junit.Assert.assertTrue;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.i18n.StringIdImpl;
+import com.gemstone.gemfire.i18n.StringId;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import com.gemstone.org.jgroups.util.StringId;
 
 /**
  * Tests for LocalizedMessage which bridges our StringId LocalizedStrings for 
@@ -23,14 +22,14 @@ public class LocalizedMessageJUnitTest {
 
   @Test
   public void testZeroParams() {
-    final StringId stringId = new StringIdImpl(100, "This is a message for testZeroParams");
+    final StringId stringId = new StringId(100, "This is a message for testZeroParams");
     final LocalizedMessage message = LocalizedMessage.create(stringId);
     assertNull(message.getParameters());
   }
   
   @Test
   public void testEmptyParams() {
-    final StringId stringId = new StringIdImpl(100, "This is a message for testEmptyParams");
+    final StringId stringId = new StringId(100, "This is a message for testEmptyParams");
     final LocalizedMessage message = LocalizedMessage.create(stringId, new Object[] {});
     final Object[] object = message.getParameters();
     assertNotNull(object);
@@ -40,7 +39,7 @@ public class LocalizedMessageJUnitTest {
   @Test
   public void testGetThrowable() {
     final Throwable t = new Throwable();
-    final StringId stringId = new StringIdImpl(100, "This is a message for testGetThrowable");
+    final StringId stringId = new StringId(100, "This is a message for testGetThrowable");
     final LocalizedMessage message = LocalizedMessage.create(stringId, t);
     assertNotNull(message.getThrowable());
     assertEquals(t, message.getThrowable());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
index 3f0d562..a98be7a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
@@ -10,6 +10,8 @@ package com.gemstone.gemfire.internal.stats50;
 import static org.junit.Assert.assertEquals;
 
 import java.util.Properties;
+import java.util.concurrent.BrokenBarrierException;
+import java.util.concurrent.CyclicBarrier;
 import java.util.concurrent.atomic.AtomicReference;
 
 import org.junit.Test;
@@ -22,8 +24,6 @@ import com.gemstone.gemfire.StatisticsTypeFactory;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import com.gemstone.org.jgroups.oswego.concurrent.BrokenBarrierException;
-import com.gemstone.org.jgroups.oswego.concurrent.CyclicBarrier;
 
 /**
  * @author dsmith
@@ -71,9 +71,9 @@ public class AtomicStatsJUnitTest {
         public void run() {
           try {
             while(true) {
-              beforeIncrement.barrier();
+              beforeIncrement.await();
               statsRef.get().incInt(statId, 1);
-              afterIncrement.barrier();
+              afterIncrement.await();
             }
           } catch (InterruptedException e) {
             // TODO Auto-generated catch block
@@ -88,8 +88,8 @@ public class AtomicStatsJUnitTest {
         public void run() {
           try {
             while(true) {
-              beforeIncrement.barrier();
-              afterIncrement.barrier();
+              beforeIncrement.await();
+              afterIncrement.await();
               statsRef.get().getInt(statId);
             }
           } catch (InterruptedException e) {
@@ -106,8 +106,8 @@ public class AtomicStatsJUnitTest {
       for(int i =0; i < 5000; i++) {
         Statistics stats = ds.createAtomicStatistics(type, "stats");
         statsRef.set(stats);
-        beforeIncrement.barrier();
-        afterIncrement.barrier();
+        beforeIncrement.await();
+        afterIncrement.await();
         assertEquals("On loop " + i, 1, stats.getInt(statId));
         stats.close();
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ReentrantSemaphoreJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ReentrantSemaphoreJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ReentrantSemaphoreJUnitTest.java
index 6012e7b..a21949e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ReentrantSemaphoreJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ReentrantSemaphoreJUnitTest.java
@@ -14,7 +14,6 @@ import java.util.concurrent.atomic.AtomicReference;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import com.gemstone.org.jgroups.oswego.concurrent.CountDown;
 
 import junit.framework.TestCase;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/CacheTimeSlowDownDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/CacheTimeSlowDownDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/CacheTimeSlowDownDUnitTest.java
deleted file mode 100755
index edee3b4..0000000
--- a/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/CacheTimeSlowDownDUnitTest.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/**
- * 
- */
-package com.gemstone.org.jgroups.protocols;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.distributed.internal.DSClock;
-import com.gemstone.gemfire.distributed.internal.DSClock.DSClockTestHook;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.distributed.internal.membership.NetMember;
-import com.gemstone.gemfire.distributed.internal.membership.NetView;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMember;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.MembershipManagerHelper;
-import com.gemstone.org.jgroups.Event;
-import com.gemstone.org.jgroups.JChannel;
-import com.gemstone.org.jgroups.Message;
-import com.gemstone.org.jgroups.protocols.GemFireTimeSync.GFTimeSyncHeader;
-import com.gemstone.org.jgroups.stack.IpAddress;
-import com.gemstone.org.jgroups.stack.ProtocolStack;
-
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.VM;
-
-/**
- * @author shobhit
- *
- */
-public class CacheTimeSlowDownDUnitTest extends DistributedTestCase {
-
-  /**
-   * 
-   */
-  private static final long serialVersionUID = 6040213401971040968L;
-
-  /**
-   * @param name
-   */
-  public CacheTimeSlowDownDUnitTest(String name) {
-    super(name);
-  }
-  
-  @Override
-  public void tearDown2() throws Exception {
-    super.tearDown2();
-    if (!logPerTest) {
-      // always disconnect from DS at the end of this test so it
-      // doesn't leave a tampered one for the next test
-      disconnectAllFromDS();
-    }
-  }
-
-  public void testCacheClockSlowDownUsingTimeTask() {
-    Host host = Host.getHost(0);
-    VM vm0 = host.getVM(0);
-    
-    disconnectAllFromDS();
-    
-    int port = getDUnitLocatorPort();
-    
-    // Check the new member's clock offset received from locator (co-ordinator)
-    final long joinTimeOffset = (Long) vm0.invoke(new SerializableCallable("Check join time offset") {
-      
-      @Override
-      public Object call() throws CacheException {
-        InternalDistributedSystem system = getSystem();
-        
-        // Just to make sure the cache time is started and accepts dm timer task.
-        Cache cache = CacheFactory.create(system);
-        
-        DistributionManager dm = (DistributionManager) system.getDistributionManager();
-        DSClock clock = dm.getSystem().getClock();
-        clock.setTestHook(new DistManagerTestHook());
-        return clock.getCacheTimeOffset();
-      }
-    });
-    
-    // Send a custom GemfireTimeSync Message to reduce the offset and in turn slow down the cache time.
-    VM locator = Host.getLocator();
-    
-    locator.invoke(new CacheSerializableRunnable("Send custom time sync message") {
-
-      @Override
-      public void run2() {
-
-        InternalDistributedSystem system = (InternalDistributedSystem) InternalDistributedSystem.getAnyInstance();
-        JGroupMembershipManager jgmm = MembershipManagerHelper.getMembershipManager(system);
-        JChannel jchannel = MembershipManagerHelper.getJChannel(system);
-
-        NetMember locMem = system.getDistributedMember().getNetMember();
-        // Check if protocol statck has GemfireTimeSync protocol in it in
-        // correct position.
-        if (jchannel != null && jchannel.isConnected()) {
-          ProtocolStack pstack = jchannel.getProtocolStack();
-          GemFireTimeSync gts = (GemFireTimeSync) pstack.findProtocol("GemFireTimeSync");
-
-          NetView nw = jgmm.getView();
-          IpAddress memAdd = null;
-          for (Object member : nw) {
-            InternalDistributedMember iMem = (InternalDistributedMember) member;
-            NetMember netMem = iMem.getNetMember();
-            if (!netMem.equals(locMem)) {
-              memAdd = ((JGroupMember)netMem).getAddress();
-            }
-          }
-
-          Message offsetMessage = new Message();
-          offsetMessage.setDest(memAdd);
-          offsetMessage.isHighPriority = true;
-          offsetMessage.putHeader("GemFireTimeSync", new GFTimeSyncHeader(0,
-          /* GFTimeSyncHeader.OP_TIME_OFFSET */(byte) 2, (joinTimeOffset - 19)));
-          gts.passDown(new Event(Event.MSG, offsetMessage));
-          getLogWriter().info("Sent a GemfireTimeSync message to apply lower offset: " + (joinTimeOffset - 19) + "ms");
-        }
-      }
-    });
-    
-    // Check if member received the message and started a timer task or not.
-    long newTimeOffset = (Long) vm0.invoke(new SerializableCallable("Verify timer task and final offset") {
-      
-      @Override
-      public Object call() throws CacheException {
-        InternalDistributedSystem system = getSystem();
-        DSClock clock = system.getClock();
-        DSClockTestHook testHook = clock.getTestHook();
-        assertNotNull(testHook);
-        while(testHook.getInformation("TimerTaskCancelled") == null) {
-          pause(100);
-        }
-        boolean isCancelled = (Boolean) testHook.getInformation("TimerTaskCancelled");
-        List<Long> cacheTimes = (List) testHook.getInformation("CacheTime");
-        List<Long> awaitedTimes = (List) testHook.getInformation("AwaitedTime");
-        
-        assertTrue(isCancelled);
-        assertEquals(cacheTimes.size(), awaitedTimes.size());
-        
-        for (int i=0; i<cacheTimes.size()-1; i++) { //Last one wont satisfy condition.
-          assertTrue((cacheTimes.get(i) - awaitedTimes.get(i)) >= 0);
-        }
-        
-        clock.setTestHook(null);
-        return clock.getCacheTimeOffset();
-      }
-    });
-    
-    assertEquals((joinTimeOffset - 19), newTimeOffset);
-    
-  }
-
-  public class DistManagerTestHook implements DSClockTestHook {
-    Map info = new HashMap();
-
-    @Override
-    public void suspendAtBreakPoint(int breakPoint) {
-      switch (breakPoint) {
-      case 1:
-        if (info.get("CacheTime") == null) {
-          info.put("CacheTime", new ArrayList());
-        }
-        if (info.get("AwaitedTime") == null) {
-          info.put("AwaitedTime", new ArrayList());
-        }
-        break;
-      case 2:        
-        break;
-      case 3:        
-        break;
-      default:
-      }
-    }
-
-    @Override
-    public void addInformation(Object key, Object value) {
-      String sKey = (String)key;
-
-      if ("CacheTime".equals(key)) {
-        List cacheTimes = (List)info.get(key);
-        cacheTimes.add(value);
-      } else if ("AwaitedTime".equals(key)) {
-        List awaitedTimes = (List)info.get(key);
-        awaitedTimes.add(value);
-      } else {
-        info.put(key, value);
-      }
-    }
-
-    @Override
-    public Object getInformation(Object key) {
-      return info.get(key);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/GemFireTimeSyncProtocolDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/GemFireTimeSyncProtocolDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/GemFireTimeSyncProtocolDUnitTest.java
deleted file mode 100644
index 9b8b6a1..0000000
--- a/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/GemFireTimeSyncProtocolDUnitTest.java
+++ /dev/null
@@ -1,477 +0,0 @@
-/**
- * 
- */
-package com.gemstone.org.jgroups.protocols;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DSClock;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.MembershipManagerHelper;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.org.jgroups.Address;
-import com.gemstone.org.jgroups.JChannel;
-import com.gemstone.org.jgroups.protocols.GemFireTimeSync.GFTimeSyncHeader;
-import com.gemstone.org.jgroups.protocols.GemFireTimeSync.TestHook;
-import com.gemstone.org.jgroups.protocols.pbcast.GMS;
-import com.gemstone.org.jgroups.stack.IpAddress;
-import com.gemstone.org.jgroups.stack.Protocol;
-import com.gemstone.org.jgroups.stack.ProtocolStack;
-
-import dunit.AsyncInvocation;
-import dunit.DistributedTestCase;
-import dunit.Host;
-import dunit.SerializableCallable;
-import dunit.VM;
-
-/**
- * This test mimics the offset time calculation done by {@link GemFireTimeSync}
- * protocol implementation and verifies it with offset times set in DMs of
- * respective GemFire nodes.
- * 
- * @author shobhit
- * 
- */
-public class GemFireTimeSyncProtocolDUnitTest extends DistributedTestCase {
-  
-  /**
-   * 
-   */
-  private static final long serialVersionUID = -8833917578265991129L;
-  
-  @Override
-  public void setUp() throws Exception {
-    disconnectAllFromDS();
-  }
-
-  /**
-   * @param name
-   */
-  public GemFireTimeSyncProtocolDUnitTest(String name) {
-    super(name);
-  }
-  // disabled for ticket #52114
-  public void disabledtestGemfireTimeSyncJgroupsProtocol() {
-    Host host = Host.getHost(0);
-    VM vm0 = host.getVM(0);
-    VM vm1 = host.getVM(1);
-    VM vm2 = host.getVM(2);
-    
-    List<Object[]> vmJoinTimeOffsets = new ArrayList<Object[]>();
-    
-    // Start distributed system in all VMs. 
-    Object[] vmjointime0 = (Object[]) getIDAndTimeOffset(vm0);    
-    vmJoinTimeOffsets.add(vmjointime0);
-
-    Object[] vmjointime1 = (Object[]) getIDAndTimeOffset(vm1);
-    vmJoinTimeOffsets.add(vmjointime1);
-
-    Object[] vmjointime2 = (Object[]) getIDAndTimeOffset(vm2);
-    vmJoinTimeOffsets.add(vmjointime2);
-
-    // Get locator VM as that is the coordinator.
-    VM locator = Host.getLocator();
-    
-    Map offsets = (Map) locator.invoke(new SerializableCallable() {
-      
-      @Override
-      public Object call() throws Exception {
-        
-        InternalDistributedSystem system = (InternalDistributedSystem) InternalDistributedSystem.getAnyInstance();
-        DistributedMember coord = MembershipManagerHelper.getCoordinator(system);
-        DistributedMember self  = system.getDistributedMember();
-        Map offs = null;
-        
-        if (self.getId().equalsIgnoreCase(coord.getId())) {
-          // Initiate a fake view change in GemfireTimeSync.
-          JGroupMembershipManager jgmm = MembershipManagerHelper.getMembershipManager(system);
-          JChannel jchannel = MembershipManagerHelper.getJChannel(system);
-
-          final UnitTestHook gftsTestHook = new UnitTestHook();
-          
-          // Check if protocol stack has GemfireTimeSync protocol in it in correct position.
-          if (jchannel != null && jchannel.isConnected()) {
-            ProtocolStack pstack = jchannel.getProtocolStack();
-            GemFireTimeSync gts = null;
-            
-            boolean found = false;
-            Protocol prot = pstack.findProtocol("GemFireTimeSync");
-            // Verify prcol position in stack for GemFireTimeSync.
-            if (prot != null) {
-
-              Protocol up_prot = prot.getUpProtocol();
-              Protocol down_prot = prot.getDownProtocol();
-
-              assertEquals("UP protocol of GemFireTimeSync protocol is: " + up_prot, "AUTH", up_prot.getName());
-              assertEquals("Down protocol of GemFireTimeSync protocol is: " + down_prot, "FRAG3", down_prot.getName());
-              found = true;
-
-              // Trigger viewchange in timesync protocol
-              gts = (GemFireTimeSync) prot;
-              gts.setTestHook(gftsTestHook);
-              getLogWriter().fine(
-                  "Invoking sync-therad in GemFireTimeSync protocol");
-              gts.invokeServiceThreadForTest();
-            }
-
-            if (!found) {
-              fail("GemFireTimeSync protocol is not found in protocol stack");
-            }
-
-            // Let GemfireTimeSync protocol kick in after VIEW_CHANGE
-            waitForCriterion(new WaitCriterion() {
-              @Override
-              public boolean done() {
-                return gftsTestHook.getBarrier() == GemFireTimeSync.TIME_RESPONSES;
-              }
-              
-              @Override
-              public String description() {
-                return "Waiting for all nodes to get time offsets from co-ordinator";
-              }
-            }, 500, 50, false);
-  
-            Map respons = gftsTestHook.getResponses();
-            
-            // unset test hook
-            if (gts != null) gts.setTestHook(null);
-  
-            offs = calculateOffsets(respons, gftsTestHook.getCurTime());
-          }
-        }
-        return offs;
-      }
-    });
-
-    List<Object[]> vmtimeOffsets = new ArrayList<Object[]>();
-
-    pause(5000);
-    
-    Object[] vmtime0 = (Object[]) getIDAndTimeOffset(vm0);
-    Object[] vmtime1 = (Object[]) getIDAndTimeOffset(vm1);    
-    Object[] vmtime2 = (Object[]) getIDAndTimeOffset(vm2);
-    
-    vmtimeOffsets.add(vmtime0);
-    vmtimeOffsets.add(vmtime1);
-    vmtimeOffsets.add(vmtime2);
-
-    // verify if they are skewed by more than 1 milli second.
-    for (int i=0; i<3; i++) {
-      String address = (String) vmtimeOffsets.get(i)[0];
-      long offsetTime = (Long) offsets.get(address);
-
-      // Offsets after join must always be going forward, no backward offsets allowed after join.
-      if (Math.abs(offsetTime - (Long)vmtimeOffsets.get(i)[1]) > 1
-          && Math.abs(((Long)vmtimeOffsets.get(i)[1]).longValue() - ((Long)vmJoinTimeOffsets.get(i)[1]).longValue()) > 1) {        
-        fail("Offset calculated locally: " + offsetTime
-            + " not equals to returned by GemFireTimeSync protocol: "
-            + vmtimeOffsets.get(i)[1] + " and join time is: " + (Long)vmJoinTimeOffsets.get(i)[1] +" for vm " + i + " address="+ vmtimeOffsets.get(i)[0]);
-      }
-    }
-  }
-
-  /**
-   * Tests the slowing down the cache time for a locator, or any kind of
-   * GemFire cache for that matter.
-   */
-  public void testGemfireTimeSyncSlowDownCacheTime() {
-    Host host = Host.getHost(0);
-    VM newLocator = host.getVM(0);
-    VM vm1 = host.getVM(1);
-    
-    List<Object[]> vmJoinTimeOffsets = new ArrayList<Object[]>();
-    
-    final int locatorPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final String host0 = getServerHostName(host); 
-    
-    final Properties props = new Properties();
-    props.setProperty("locators", host0 + "[" + locatorPort + "]");
-    props.setProperty("mcast-port", "0");
-    props.setProperty("jmx-manager", "false");
-    //props.setProperty("enable-network-partition-detection", "true");
-//    props.setProperty("log-level", "fine");
-    props.put("member-timeout", "2000");
-    
-    try {
-      // Start new locator in vm0
-      newLocator.invoke(new CacheSerializableRunnable("Start locator") {
-        
-        @Override
-        public void run2() throws CacheException {
-          // Disconnect from any existing DS.
-          try {
-            system.disconnect();
-          } catch (Exception ex) {
-            // Let it go.
-          }
-          File myLocatorLogFile = new File("locator-"+locatorPort+".log"); 
-  
-          try {
-            Locator.startLocatorAndDS(locatorPort, myLocatorLogFile, props);
-          } catch (IOException e) {
-            fail("New locator startup failed on port: "+locatorPort, e);
-          }
-        }
-      });
-      
-      // Add a new member to trigger VIEW_CHANGE.
-      vm1.invoke(new CacheSerializableRunnable("Starting vm1") {
-        @Override
-        public void run2() {
-          // Disconnect from any existing DS.
-          disconnectFromDS();
-          
-          DistributedSystem.connect(props);
-        }
-      });
-
-      AsyncInvocation slowDownCacheTimeTask = newLocator.invokeAsync(new CacheSerializableRunnable("Slow down locator cache time") {
-        
-        @Override
-        public void run2() throws CacheException {
-  
-          InternalDistributedSystem system = (InternalDistributedSystem) InternalDistributedSystem
-              .getAnyInstance();
-          final DSClock clock = system.getClock();
-  
-          // Set lower time offset
-          long currOffset = clock.getCacheTimeOffset();
-          final long newOffset = currOffset - 10 /* ms */;
-  
-          clock.setCacheTimeOffset(null, newOffset, false);
-          // Let GemfireTimeSync protocol kick in after VIEW_CHANGE
-          waitForCriterion(new WaitCriterion() {
-            @Override
-            public boolean done() {
-              return clock.getCacheTimeOffset() == newOffset;
-            }
-  
-            @Override
-            public String description() {
-              return "Waiting for locator cache time to slowdown";
-            }
-          }, 30, 2, true);
-        }
-      });
-      
-      DistributedTestCase.join(slowDownCacheTimeTask, 100, getLogWriter());
-      if (slowDownCacheTimeTask.exceptionOccurred()) {
-        fail("Slow down locator cache time task failed with exception", slowDownCacheTimeTask.getException());
-      }
-    } finally {
-      // Shutdown locator and clean vm0 for other tests.
-      newLocator.invoke(new CacheSerializableRunnable("Shutdown locator") {
-        
-        @Override
-        public void run2() throws CacheException {
-          try {
-            InternalDistributedSystem.getConnectedInstance().disconnect();
-          } catch (Exception e) {
-            fail("Stoping locator failed", e);
-          }
-        }
-      });
-
-      vm1.invoke(new CacheSerializableRunnable("Shutdown vm1") {
-        
-        @Override
-        public void run2() throws CacheException {
-          try {
-            InternalDistributedSystem.getConnectedInstance().disconnect();
-          } catch (Exception e) {
-            fail("Stoping vm1 failed", e);
-          }
-        }
-      });
-    }
-  }
-
-  public class UnitTestHook implements TestHook {
-
-    private Map<Address, GFTimeSyncHeader> respons;
-    private long curTime;
-
-    private int barrier = -1;
-
-    @Override
-    public void hook(int barr) {
-      this.barrier = barr;
-      if (barrier == GemFireTimeSync.TIME_RESPONSES) {
-        pause(200);
-      }
-    }
-
-    @Override
-    public void setResponses(Map<Address, GFTimeSyncHeader> responses,
-        long currentTime) {
-      this.respons = responses;
-      this.curTime = currentTime;
-    }
-
-    public Map<Address, GFTimeSyncHeader> getResponses() {
-      return respons;
-    }
-
-    public long getCurTime() {
-      return curTime;
-    }
-
-    public int getBarrier() {
-      return barrier;
-    }
-  }
-
-  public Object getIDAndTimeOffset(VM vm) {
-    return vm.invoke(new SerializableCallable() {
-      
-      @Override
-      public Object call() throws Exception {
-        InternalDistributedSystem system = getSystem();
-        JChannel jchannel = MembershipManagerHelper.getJChannel(system);
-
-        final UnitTestHook gftsTestHook = new UnitTestHook();
-        Protocol prot = jchannel.getProtocolStack().findProtocol("GemFireTimeSync");
-        GemFireTimeSync gts = (GemFireTimeSync)prot;
-        gts.setTestHook(gftsTestHook);
-        //Let the syncMessages reach to all VMs for new offsets.
-        waitForCriterion(new WaitCriterion() {
-          
-          @Override
-          public boolean done() {
-            return gftsTestHook.getBarrier() == GemFireTimeSync.OFFSET_RESPONSE;
-          }
-          
-          @Override
-          public String description() {
-            return "Waiting for this node to get time offsets from co-ordinator";
-          }
-        }, 500, 50, false);
-        
-        
-        long timeOffset = system.getClock().getCacheTimeOffset();
-        gts.setTestHook(null);
-        
-        
-        prot = jchannel.getProtocolStack().findProtocol("GMS");
-        GMS gms = (GMS)prot;
-        String address = gms.getLocalAddress();
-        return new Object[]{address, timeOffset};
-      }
-    });
-  }
-  /*
-   * All Berkley time service calculation related helper methods.
-   * Same is done in GemFireTimeSync protocol.
-   * 
-   */
-
-  private Map calculateOffsets(Map responses, long currentTime) {
-    Map offsets = new HashMap();
-    
-    if (responses.size() > 1) {
-
-      // now compute the average round-trip time and the average clock time,
-      // throwing out values outside of the standard deviation for each
-      
-      long averageRTT = getMeanRTT(responses, 0, Long.MAX_VALUE);
-      long rTTStddev = getRTTStdDev(responses, averageRTT);
-      // now recompute the average throwing out ones that are way off
-      long newAverageRTT = getMeanRTT(responses, averageRTT, rTTStddev);
-      if (newAverageRTT > 0) {
-        averageRTT = newAverageRTT;
-      }
-      
-      long averageTime = getMeanClock(responses, 0, Long.MAX_VALUE);
-      long stddev = getClockStdDev(responses, averageTime);
-      long newAverageTime = getMeanClock(responses, averageTime, stddev);
-      if (newAverageTime > 0) {
-        averageTime = newAverageTime;
-      }
-      
-      long averageTransmitTime = averageRTT / 2;
-      long adjustedAverageTime = averageTime + averageTransmitTime;
-      
-      // TODO: should all members on the same machine get the same time offset?
-      
-      for (Iterator<Map.Entry<Address, GFTimeSyncHeader>> it = responses.entrySet().iterator(); it.hasNext(); ) {
-        Map.Entry<Address, GFTimeSyncHeader> entry = it.next();
-        IpAddress mbr = (IpAddress)entry.getKey();
-        GFTimeSyncHeader response = entry.getValue();
-        long responseTransmitTime = (response.timeReceived - currentTime) / 2;
-        long offset = adjustedAverageTime - (response.time + responseTransmitTime);
-        offsets.put(mbr.toString(), offset);
-      }
-    }
-    return offsets;
-  }
-
-  private long getMeanRTT(Map<Address, GFTimeSyncHeader> values, long previousMean, long stddev) {
-    long totalTime = 0;
-    long numSamples = 0;
-    long upperLimit = previousMean + stddev;
-    for (GFTimeSyncHeader response: values.values()) {
-      long rtt = response.timeReceived - response.time;
-      if (rtt <= upperLimit) {
-        numSamples++;
-        totalTime += rtt;
-      }
-    }
-    long averageTime = totalTime / numSamples;
-    return averageTime;
-  }
-  
-  private long getRTTStdDev(Map<Address, GFTimeSyncHeader> values, long average) {
-    long sqDiffs = 0;
-    for (GFTimeSyncHeader response: values.values()) {
-      long diff = average - (response.timeReceived - response.time);
-      sqDiffs += diff * diff;
-    }
-    return Math.round(Math.sqrt((double)sqDiffs));
-  }
-
-  /**
-   * retrieves the average of the samples.  This can be used with (samples, 0, Long.MAX_VALUE) to get
-   * the initial mean and then (samples, lastResult, stddev) to get those within the standard deviation.
-   * @param values
-   * @param previousMean
-   * @param stddev
-   * @return the mean
-   */
-  private long getMeanClock(Map<Address, GFTimeSyncHeader> values, long previousMean, long stddev) {
-    long totalTime = 0;
-    long numSamples = 0;
-    long upperLimit = previousMean + stddev;
-    long lowerLimit = previousMean - stddev;
-    for (GFTimeSyncHeader response: values.values()) {
-      if (lowerLimit <= response.time && response.time <= upperLimit) {
-        numSamples++;
-        totalTime += response.time;
-      }
-    }
-    long averageTime = totalTime / numSamples;
-    return averageTime;
-  }
-  
-  private long getClockStdDev(Map<Address, GFTimeSyncHeader> values, long average) {
-    long sqDiffs = 0;
-    for (GFTimeSyncHeader response: values.values()) {
-      long diff = average - response.time;
-      sqDiffs += diff * diff;
-    }
-    return Math.round(Math.sqrt((double)sqDiffs));
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/JGroupsFailureDetectionJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/JGroupsFailureDetectionJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/JGroupsFailureDetectionJUnitTest.java
deleted file mode 100644
index 3999785..0000000
--- a/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/JGroupsFailureDetectionJUnitTest.java
+++ /dev/null
@@ -1,488 +0,0 @@
-package com.gemstone.org.jgroups.protocols;
-
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Vector;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import junit.framework.TestCase;
-
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.GFJGBasicAdapter;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import com.gemstone.org.jgroups.Address;
-import com.gemstone.org.jgroups.ChannelClosedException;
-import com.gemstone.org.jgroups.ChannelException;
-import com.gemstone.org.jgroups.ChannelNotConnectedException;
-import com.gemstone.org.jgroups.Event;
-import com.gemstone.org.jgroups.JChannel;
-import com.gemstone.org.jgroups.Message;
-import com.gemstone.org.jgroups.SuspectMember;
-import com.gemstone.org.jgroups.TimeoutException;
-import com.gemstone.org.jgroups.View;
-import com.gemstone.org.jgroups.ViewId;
-import com.gemstone.org.jgroups.stack.GFBasicAdapterImpl;
-import com.gemstone.org.jgroups.stack.IpAddress;
-import com.gemstone.org.jgroups.stack.Protocol;
-import com.gemstone.org.jgroups.stack.ProtocolStack;
-import com.gemstone.org.jgroups.util.GemFireTracer;
-
-@Category(IntegrationTest.class)
-public class JGroupsFailureDetectionJUnitTest {
-
-  static final int numMembers = 40;
-  static final int memberTimeout = 300;
-
-  // JGroups protocol stacks for each member
-  List<ProtocolStack> stacks = new ArrayList<ProtocolStack>(numMembers);
-
-  // each member's address
-  Vector<IpAddress> members = new Vector<IpAddress>(numMembers);
-  
-  // mapping from address to member's protocol stack
-  Map<IpAddress, ProtocolStack> addressToStack = new HashMap<IpAddress, ProtocolStack>();
-  
-
-  
-  @Before
-  public void setUp() throws Exception {
-//    GemFireTracer.DEBUG = true;
-    JChannel.setDefaultGFFunctions(new GFJGBasicAdapter());
-    InetAddress addr = InetAddress.getLocalHost();
-
-    // create the protocol stacks and addresses
-    for (int i=1; i<=numMembers; i++) {
-      IpAddress mbr = new IpAddress(addr, i+10000);
-      members.add(mbr);
-      ProtocolStack stack = createStack(mbr);
-      stacks.add(stack);
-      addressToStack.put(mbr, stack);
-      getMessagingProtocol(stack).setRecipients(addressToStack);
-    }
-  }
-  
-  @After
-  public void tearDown() throws Exception {
-    GemFireTracer.DEBUG = false;
-    JChannel.setDefaultGFFunctions(new GFBasicAdapterImpl());
-    for (ProtocolStack stack: stacks) {
-      stack.stop();
-    }
-  }
-
-  ProtocolStack createStack(IpAddress addr) throws Exception {
-    CollectingProtocol top = new CollectingProtocol(true, false);
-    TestFD_SOCK tfds = new TestFD_SOCK();
-    TestFD tfd = new TestFD();
-    TestVERIFY_SUSPECT tvs = new TestVERIFY_SUSPECT();
-    MessagingProtocol bottom = new MessagingProtocol();
-    
-    // connect the protocols into a stack and start them
-    top.setDownProtocol(tvs);
-    tvs.setUpProtocol(top);  tvs.setDownProtocol(tfds);
-    tfds.setUpProtocol(tvs); tfds.setDownProtocol(tfd);
-    tfd.setUpProtocol(tfds); tfd.setDownProtocol(bottom);
-//    tfdr.setUpProtocol(tfd); tfdr.setDownProtocol(bottom);
-    bottom.setUpProtocol(tfd);
-    
-    MyChannel channel = MyChannel.create(null, addr);
-    ProtocolStack stack = ProtocolStack.createTestStack(channel, top);
-    Vector protocols = stack.getProtocols();
-    for (int i=0; i<protocols.size(); i++) {
-      Protocol p = (Protocol)protocols.get(i);
-      p.init();
-    }
-    channel.setProtocolStack(stack);
-    return stack;
-  }
-  
-  IpAddress getFDSockAddress(ProtocolStack stack) {
-    TestFD_SOCK fdsock = (TestFD_SOCK)stack.findProtocol("FD_SOCK");
-    return fdsock.getFdSockAddress();
-  }
-  
-  MessagingProtocol getMessagingProtocol(ProtocolStack stack) {
-    return (MessagingProtocol)stack.findProtocol("MessagingProtocol");
-  }
-  
-  
-  void killStack(ProtocolStack stack) {
-    TestFD_SOCK fdsock = (TestFD_SOCK)stack.findProtocol("FD_SOCK");
-    TestVERIFY_SUSPECT vs = (TestVERIFY_SUSPECT)stack.findProtocol("VERIFY_SUSPECT");
-    vs.playDead(true);
-    fdsock.beSick();
-    stack.getChannel().close();
-  }
-  
-  
-  /**
-   * This test creates a jgroups protocol stack holding our failure-detection
-   * protocols.  At the top of the stack is a protocol defined by this test
-   * that collects non-message events and at the bottom is a messaging simulation
-   * protocol that routes messages to the correct stack.<p>
-   * 
-   * Forty stacks are created, simulating 40 members in a distributed system.
-   * The first twenty are then killed and we observe how long it takes for the
-   * remaining members to figure it out.  If they don't figure it out fast enough
-   * the test fails.
-   *  
-   * @throws Exception
-   */
-  @SuppressWarnings({ "unchecked", "rawtypes" })
-  @Test
-  public void testFailureDetectionManyMembers() throws Exception {
-    
-    
-    // create the first view
-    IpAddress coord = members.get(0);
-    ViewId vid = new ViewId(coord, 1);
-    View view = new View(vid, members);
-    for (int i=0; i<stacks.size(); i++) {
-      Protocol bot = stacks.get(i).getBottomProtocol();
-      bot.up(new Event(Event.SET_LOCAL_ADDRESS, members.get(i)));
-      Protocol top = stacks.get(i).getTopProtocol();
-      top.down(new Event(Event.CONNECT));
-      bot.up(new Event(Event.CONNECT_OK));
-      top.down(new Event(Event.VIEW_CHANGE, view));
-      bot.up(new Event(Event.VIEW_CHANGE, view));
-    }
-    
-    // collect the FD_SOCK server socket addresses and create
-    // a cache, then pass it to all of the stacks
-    Hashtable cache = new Hashtable();
-    for (int i=0; i<numMembers; i++) {
-      IpAddress fdSockAddr = getFDSockAddress(stacks.get(i));
-      System.out.println("member " + members.get(i) + " has FD_SOCK address " + fdSockAddr);
-      cache.put(members.get(i), fdSockAddr);
-    }
-    
-    for (int i=0; i<stacks.size(); i++) {
-      Event ev = new Event(Event.MSG);
-      Message m = new Message();
-      m.setSrc(coord);
-      Hashtable c = new Hashtable(cache);
-      m.putHeader("FD_SOCK", new FD_SOCK.FdHeader(FD_SOCK.FdHeader.GET_CACHE_RSP, c));
-      ev.setArg(m);
-      Protocol bot = stacks.get(i).getBottomProtocol();
-      m.setDest(members.get(i));
-      bot.up(ev);
-    }
-    
-//    if (true) {
-//      return;
-//    }
-  
-    // give members time to exchange fd_sock information
-    Thread.sleep(3000);
-    
-    // kill half of the members, including the coordinator
-    for (int i=0; i<(numMembers/2); i++) {
-      killStack(stacks.get(i));
-    }
-    
-//    Thread.sleep(2 * memberTimeout);
-
-    // now wait for members to figure out that half of them
-    // are gone.  On an old unloaded linux machine this usually
-    // takes < 1.5 seconds but we allow more since this test
-    // will be run in parallel with other junit tests
-    long maxWaitTime = (3 * memberTimeout) * 10;
-    int expectedCount = numMembers/2;
-    StringBuilder failures;
-    long startTime = System.currentTimeMillis();
-    long giveUpTime = startTime + maxWaitTime;
-    do {
-      // verify that all remaining members have kicked out the bad guys
-      failures = new StringBuilder();
-      for (int i=(numMembers/2); i<numMembers; i++) {
-        CollectingProtocol top = (CollectingProtocol)stacks.get(i).getTopProtocol();
-        boolean[] suspects = new boolean[numMembers/2];
-        int numSuspects = 0;
-        synchronized(top.collectedUpEvents) { 
-          for (Event event: top.collectedUpEvents) {
-            if (event != null  &&  event.getType() == Event.SUSPECT) { 
-              SuspectMember suspect = (SuspectMember)event.getArg();
-              int index = ((IpAddress)suspect.suspectedMember).getPort() - 10000 - 1;
-              if (!suspects[index]) {
-                suspects[index] = true;
-                numSuspects++;
-              }
-            }
-          }
-        }
-        if (numSuspects < expectedCount) {
-          if (failures.length() > 0) {
-            failures.append("\n");
-          }
-          failures.append("member ").append(i+1).append(" only saw ").append(numSuspects)
-           .append(" failures but should have seen ").append(expectedCount).append(".  missing=");
-          for (int si=0; si<suspects.length; si++) {
-            if (!suspects[si]) {
-              failures.append(" ").append(si+1);
-            }
-          }
-        }
-      }
-    } while (failures.length() > 0 && System.currentTimeMillis() < giveUpTime);
-    if (failures.length() > 0) {
-      Assert.fail(failures);
-    } else {
-      System.out.println("completed in "
-          + (System.currentTimeMillis() - startTime) + "ms");
-    }
-  }
-  
-  
-  public static class TestFD_SOCK extends FD_SOCK {
-    public TestFD_SOCK() {
-      num_tries=1;
-      connectTimeout=memberTimeout;
-      start_port=1024;
-      end_port=65535;
-      up_thread=false;
-      down_thread=false;
-    }
-    public IpAddress getFdSockAddress() {
-      return this.srv_sock_addr;
-    }
-    @Override
-    public boolean isDisconnecting() {
-      return !this.stack.getChannel().isConnected();
-    }
-  }
-  
-  public static class TestFD extends FD {
-    public TestFD() {
-      timeout=memberTimeout;
-      max_tries=1;
-      up_thread=false;
-      down_thread=false;
-      shun=false;
-    }
-  }
-  
-  public static class TestVERIFY_SUSPECT extends VERIFY_SUSPECT {
-    public TestVERIFY_SUSPECT() {
-      timeout=memberTimeout;
-      up_thread=false;
-      down_thread=false;
-    }
-  }
-  
-  public static class MessagingProtocol extends Protocol {
-    Map<IpAddress,ProtocolStack> recipients;
-    IpAddress myAddress;
-    
-    public void setRecipients(Map<IpAddress,ProtocolStack> recipients) {
-      this.recipients = recipients;
-    }
-    public String getName() {
-      return "MessagingProtocol";
-    }
-    public void up(Event ev) {
-      switch (ev.getType()) {
-      case Event.SET_LOCAL_ADDRESS:
-        myAddress = (IpAddress)ev.getArg();
-        break;
-      }
-      passUp(ev);
-    }
-    public void down(Event ev) {
-      switch (ev.getType()) {
-      case Event.MSG:
-        Message m = (Message)ev.getArg();
-        m.setSrc(myAddress);
-        log.debug(""+myAddress+" is sending " + m);
-        if (m.getDest() == null) {
-          for (ProtocolStack stack: recipients.values()) {
-            stack.getBottomProtocol().up(ev);
-          }
-        } else {
-          ProtocolStack stack = recipients.get(m.getDest());
-          if (stack.getChannel().isOpen()) {
-            stack.getBottomProtocol().up(ev);
-          }
-        }
-        break;
-      default:
-        passDown(ev);
-      }
-    }
-  }
-
-  /**
-   * CollectingProtocol gathers the messages it receives in up() and down()
-   * for later inspection.
-   */
-  public static class CollectingProtocol extends Protocol {
-    List<Event> collectedUpEvents = null;
-    List<Event> collectedDownEvents;
-    Address myAddress;
-    
-    public CollectingProtocol(boolean collectUp, boolean collectDown) {
-      if (collectUp) {
-        collectedUpEvents = new LinkedList<Event>();
-      }
-      if (collectDown) {
-        collectedDownEvents = new LinkedList<Event>();;
-      }
-    }
-    
-    @Override
-    public String getName() {
-      return "CollectingProtocol";
-    }
-    
-    public void clear() {
-      if (collectedDownEvents != null) {
-        synchronized(collectedDownEvents) {
-          collectedDownEvents.clear();
-        }
-      }
-      if (collectedUpEvents != null) {
-        synchronized(collectedUpEvents) {
-          collectedUpEvents.clear();
-        }
-      }
-    }
-    
-    @Override
-    public void down(Event ev) {
-      if (collectedDownEvents != null) {
-        log.debug(""+myAddress+" collecting event " + ev);
-        synchronized(collectedDownEvents) {
-          collectedDownEvents.add(ev);
-        }
-      }
-      passDown(ev);
-    }
-    
-    @Override
-    public void up(Event ev) {
-      boolean skip = false;
-      switch (ev.getType()) {
-      case Event.SET_LOCAL_ADDRESS:
-        myAddress = (IpAddress)ev.getArg();
-        skip = true;
-        break;
-      case Event.MSG:
-        skip = true;
-        break;
-      }
-      if (!skip  &&  collectedUpEvents != null) {
-        log.debug(""+myAddress+" collecting event " + ev);
-        synchronized(collectedUpEvents) {
-          collectedUpEvents.add(ev);
-        }
-      }
-      passUp(ev);
-    }
-  }
-  
-  public static class MyChannel extends JChannel {
-
-    boolean isOpen = true;
-    View myView;
-    Address myAddress;
-    
-    public static MyChannel create(View v, Address addr) throws ChannelException {
-      MyChannel instance = new MyChannel();
-      instance.myView = v;
-      instance.myAddress = addr;
-      return instance;
-    }
-
-    public void setProtocolStack(ProtocolStack stack) {
-      this.prot_stack = stack;
-    }
-
-    public MyChannel() throws ChannelException {
-    }
-    
-    public MyChannel(Properties p) throws ChannelException {
-    }
-
-    protected GemFireTracer getLog() {
-      return null;
-    }
-    public void connect(String channel_name) throws ChannelException,
-        ChannelClosedException {
-    }
-    public void disconnect() {
-      isOpen = false;
-    }
-    public void close() {
-      isOpen = false;
-      getProtocolStack().down(new Event(Event.DISCONNECT));
-      getProtocolStack().down(new Event(Event.STOP));
-    }
-    public void shutdown() {
-      isOpen = false;
-    }
-    public boolean isOpen() {
-      return isOpen;
-    }
-    public boolean isConnected() {
-      return isOpen;
-    }
-    public Map dumpStats() {
-      return null;
-    }
-    public void send(Message msg) throws ChannelNotConnectedException,
-        ChannelClosedException {
-    }
-    public void send(Address dst, Address src, Serializable obj)
-        throws ChannelNotConnectedException, ChannelClosedException {
-    }
-    public Object receive(long timeout) throws ChannelNotConnectedException,
-        ChannelClosedException, TimeoutException {
-      return null;
-    }
-    public Object peek(long timeout) throws ChannelNotConnectedException,
-        ChannelClosedException, TimeoutException {
-      return null;
-    }
-    public View getView() {
-      return myView;
-    }
-    public Address getLocalAddress() {
-      return myAddress;
-    }
-    public String getChannelName() {
-      return "GF7";
-    }
-    public void setOpt(int option, Object value) {
-    }
-    public Object getOpt(int option) {
-      return null;
-    }
-    public void blockOk() {
-    }
-    public boolean getState(Address target, long timeout)
-        throws ChannelNotConnectedException, ChannelClosedException {
-      return false;
-    }
-    public boolean closing() {
-      return !isOpen;
-    }
-    public boolean getAllStates(Vector targets, long timeout)
-        throws ChannelNotConnectedException, ChannelClosedException {
-      return false;
-    }
-    public void returnState(byte[] state) {
-    }
-    
-  }
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/JGroupsVersioningJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/JGroupsVersioningJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/JGroupsVersioningJUnitTest.java
deleted file mode 100644
index 25229be..0000000
--- a/gemfire-core/src/test/java/com/gemstone/org/jgroups/protocols/JGroupsVersioningJUnitTest.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/*=========================================================================
- * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * more patents listed at http://www.pivotal.io/patents.
- *========================================================================
- */
-package com.gemstone.org.jgroups.protocols;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Vector;
-
-import junit.framework.TestCase;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.GFJGBasicAdapter;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.VersionedDataInputStream;
-import com.gemstone.gemfire.internal.VersionedDataOutputStream;
-import com.gemstone.gemfire.internal.VersionedObjectInput;
-import com.gemstone.gemfire.internal.VersionedObjectOutput;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import com.gemstone.org.jgroups.Address;
-import com.gemstone.org.jgroups.Event;
-import com.gemstone.org.jgroups.Header;
-import com.gemstone.org.jgroups.JChannel;
-import com.gemstone.org.jgroups.Message;
-import com.gemstone.org.jgroups.View;
-import com.gemstone.org.jgroups.stack.GFBasicAdapterImpl;
-import com.gemstone.org.jgroups.stack.IpAddress;
-import com.gemstone.org.jgroups.stack.Protocol;
-@Category(UnitTest.class)
-public class JGroupsVersioningJUnitTest {
-
-  private static final String HEADER_NAME = "vHeader";
-
-  /* 
-   * For the tests in this class we create a functioning InternalDistributedSystem
-   * with tcp disabled and test with its jgroups channel.
-   */
-  @Before
-  public void setUp() throws IOException {
-    JChannel.setDefaultGFFunctions(new GFJGBasicAdapter());
-  }
-
-  @After
-  public void tearDown() {
-    JChannel.setDefaultGFFunctions(new GFBasicAdapterImpl());
-  }
-  
-  /** basic marshaling test for a Message */
-  @Test
-  public void testMessageVersioning() throws Exception {
-    Version v = Version.GFE_81;
-    VersionedIpAddress src = new VersionedIpAddress("localhost", 12345, v);
-    Message m = new Message(true);
-    m.setSrc(src);
-    m.setVersion(v.ordinal()); // set the serialization version
-    VersionedHeader header = new VersionedHeader();
-    m.putHeader(HEADER_NAME, header);
-    ByteArrayOutputStream bos = new ByteArrayOutputStream();
-    DataOutputStream out = new DataOutputStream(bos);
-    m.writeTo(out);
-    Assert.assertTrue(header.serializedVersion == v, "expected header to serialize with older version");
-    Assert.assertTrue(src.serializedVersion == v, "expected src address to serialize with older version");
-    out.close();
-    byte[] result = bos.toByteArray();
-    
-    ByteArrayInputStream bis = new ByteArrayInputStream(result);
-    DataInputStream in = new DataInputStream(bis);
-    m = new Message(true);
-    m.setVersion(v.ordinal());
-    m.readFrom(in);
-    header = (VersionedHeader)m.getHeader(HEADER_NAME);
-    Assert.assertTrue(header != null, "expected to find a VersionedHeader");
-    Assert.assertTrue(header.serializedVersion == v, "expected header to be deserialized with an older version");
-    // Deserialization of Messages create IpAddress instances directly, so we can't expect the
-    // message to contain a VersionedIpAddress.
-  }
-  
-  /**
-   * Test that the transport protocol handles versioning properly
-   * @throws Exception
-   */
-  @Test
-  public void testUDP() throws Exception {
-    System.out.println("starting testUDP");
-    TestUDP udp = new TestUDP();
-    JChannel.setDefaultGFFunctions(new GFJGBasicAdapter());
-    Version v = Version.GFE_81;
-    VersionedIpAddress src = new VersionedIpAddress("localhost", 12345, v);
-    VersionedIpAddress dest = new VersionedIpAddress("localhost", 12347, v);
-    udp.down(new Event(Event.SET_LOCAL_ADDRESS, src));
-
-    Vector mbrs = new Vector();
-    mbrs.add(src); mbrs.add(dest);
-    View view = new View(src, 1, mbrs);
-    udp.down(new Event(Event.VIEW_CHANGE, view));
-
-    // send a multicast message first
-    Message m = new Message(true);
-    m.setSrc(src);
-    VersionedHeader header = new VersionedHeader();
-    m.putHeader(HEADER_NAME, header);
-    udp.down(new Event(Event.MSG, m));
-    Assert.assertTrue(header.serializedVersion == v, "expected header to serialize with older version");
-    VersionedIpAddress msgSrc = (VersionedIpAddress)m.getSrc();
-    Assert.assertTrue(msgSrc.serializedVersion == v, "expected src address to serialize with older version: " + msgSrc);
-
-    // simulate receiving the message
-    List<Buffer> buffers = udp.collectedBuffers;
-    Assert.assertTrue(buffers.size() == 1); // should have serialized one message and sent it out
-    Buffer buffer = buffers.get(0);
-    udp.receive(src, dest, buffer.data, buffer.offset, buffer.length);
-    Message msg = udp.lastReceivedMessage;
-    Assert.assertTrue(msg.getVersion() == v.ordinal());
-    header = (VersionedHeader)msg.getHeader(HEADER_NAME);
-    Assert.assertTrue(header != null); // header should have been included
-    Assert.assertTrue(header.serializedVersion == v);
-
-    // now do the same with a point-to-point message
-    udp.collectedBuffers.clear();
-    udp.lastReceivedMessage = null;
-
-    m = new Message(true);
-    m.setSrc(src);
-    m.setDest(dest);
-    header = new VersionedHeader();
-    m.putHeader(HEADER_NAME, header);
-    udp.down(new Event(Event.MSG, m));
-    Assert.assertTrue(header.serializedVersion == v, "expected header to serialize with older version");
-    msgSrc = (VersionedIpAddress)m.getSrc();
-    Assert.assertTrue(msgSrc.serializedVersion == v, "expected src address to serialize with older version: " + msgSrc);
-
-    // simulate receiving the message
-    buffers = udp.collectedBuffers;
-    Assert.assertTrue(buffers.size() == 1); // should have serialized one message and sent it out
-    buffer = buffers.get(0);
-    udp.receive(src, dest, buffer.data, buffer.offset, buffer.length);
-    msg = udp.lastReceivedMessage;
-    Assert.assertTrue(msg.getVersion() == v.ordinal());
-    header = (VersionedHeader)msg.getHeader(HEADER_NAME);
-    Assert.assertTrue(header != null); // header should have been included
-    Assert.assertTrue(header.serializedVersion == v);
-  }
-  
-  
-  public static class Buffer {
-    Address dest;
-    byte[] data;
-    int offset;
-    int length;
-    
-    public Buffer(byte[] data, int offset, int length) {
-      this.data = data;
-      this.offset = offset;
-      this.length = length;
-    }
-    public Buffer(Address dest, byte[] data, int offset, int length) {
-      this.data = data;
-      this.offset = offset;
-      this.length = length;
-      this.dest = dest;
-    }
-  }
-  
-  
-  /**
-   * TestUDP extends UDP and overrides some methods for unit testing
-   */
-  public static class TestUDP extends UDP {
-    List<Buffer> collectedBuffers = new LinkedList<Buffer>();
-    Message lastReceivedMessage;
-    
-    @Override
-    public void sendToAllMembers(byte[] data, int offset, int length)
-        throws Exception {
-      collectedBuffers.add(new Buffer(data, offset, length));
-    }
-
-    @Override
-    protected Message bufferToMessage(DataInputStream instream, Address dest,
-        Address sender, boolean multicast) throws Exception {
-      this.lastReceivedMessage = super.bufferToMessage(instream, dest, sender, multicast);
-      return this.lastReceivedMessage;
-    }
-
-    @Override
-    public void sendToSingleMember(Address dest, boolean isJoinResponse,
-        byte[] data, int offset, int length) throws Exception {
-      collectedBuffers.add(new Buffer(dest, data, offset, length));
-    }
-    
-  }
-  
-
-  /**
-   * CollectingProtocol gathers the messages it receives in up() and down()
-   * for later inspection.
-   */
-  public static class CollectingProtocol extends Protocol {
-    List<Message> collectedMessages = new LinkedList<Message>();
-    
-    @Override
-    public String getName() {
-      return "CollectingProtocol";
-    }
-    
-    @Override
-    public void down(Event ev) {
-      if (ev.getType() == Event.MSG) {
-        collectedMessages.add((Message)ev.getArg());
-      }
-    }
-    
-    @Override
-    public void up(Event ev) {
-      if (ev.getType() == Event.MSG) {
-        collectedMessages.add((Message)ev.getArg());
-      }
-    }
-  }
-  
-  /**
-   * VersionedIpAddress is an IpAddress that tracks what version was
-   * used for serialization/deserialization
-   */
-  public static class VersionedIpAddress extends IpAddress {
-    Version serializedVersion;
-    
-    public VersionedIpAddress(String host, int port, Version v) {
-      super(host, port);
-      setVersionOrdinal(v.ordinal());
-    }
-    
-    @Override
-    public String getName() {
-      return "";
-    }
-    
-    @Override
-    public String toString() {
-      String sup = super.toString();
-      if (this.serializedVersion != null) {
-        sup += " serialized with " + serializedVersion;
-      }
-      return sup + "@" + Integer.toHexString(System.identityHashCode(this));
-    }
-
-    @Override
-    public void writeExternal(ObjectOutput out) throws IOException {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void readExternal(ObjectInput in) throws IOException,
-        ClassNotFoundException {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void toData(DataOutput out) throws IOException {
-//      System.out.println("serializing " + this + " with " + out);
-//      Thread.dumpStack();
-      if (out instanceof VersionedDataOutputStream) {
-        this.serializedVersion = ((VersionedDataOutputStream)out).getVersion();
-      } else {
-        this.serializedVersion = Version.CURRENT;
-      }
-      super.toData(out);
-    }
-
-    @Override
-    public void fromData(DataInput in) throws IOException {
-      if (in instanceof VersionedDataInputStream) {
-        this.serializedVersion = ((VersionedDataInputStream)in).getVersion();
-      } else {
-        this.serializedVersion = Version.CURRENT;
-      }
-      super.fromData(in);
-    }
-
-    
-  }
-  
-  
-  /**
-   * VersionedHeader is a JGroups message header that keeps track of
-   * what version was used to serialize/deserialize it. 
-   */
-  public static class VersionedHeader extends Header {
-    Version serializedVersion;
-    
-    public VersionedHeader() {
-      super();
-    }
-    
-    @Override
-    public void writeExternal(ObjectOutput out) throws IOException {
-      System.out.println("VersionedHeader.writeExternal invoked with " + out);
-      if (out instanceof VersionedObjectOutput) {
-        this.serializedVersion = ((VersionedObjectOutput)out).getVersion();
-      } else {
-        this.serializedVersion = Version.CURRENT;
-      }
-      out.writeBoolean(true);
-      out.writeUTF("a header written with " + this.serializedVersion);
-    }
-
-    @Override
-    public void readExternal(ObjectInput in) throws IOException,
-        ClassNotFoundException {
-      System.out.println("VersionedHeader.readExternal invoked with " + in);
-      if (in instanceof VersionedObjectInput) {
-        this.serializedVersion = ((VersionedObjectInput)in).getVersion();
-      } else {
-        this.serializedVersion = Version.CURRENT;
-      }
-      in.readBoolean();
-      in.readUTF();
-    }
-    
-    @Override
-    public String toString() {
-      return "VersionedHeader(v="+this.serializedVersion+")";
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/test/java/dunit/DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/DistributedTestCase.java b/gemfire-core/src/test/java/dunit/DistributedTestCase.java
index c39dcd3..a1d8a29 100755
--- a/gemfire-core/src/test/java/dunit/DistributedTestCase.java
+++ b/gemfire-core/src/test/java/dunit/DistributedTestCase.java
@@ -44,8 +44,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.CreationStackGenerator;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.MembershipManagerHelper;
+import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.internal.InternalInstantiator;
@@ -66,11 +65,6 @@ import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.internal.logging.ManagerLogWriter;
 import com.gemstone.gemfire.internal.logging.log4j.LogWriterLogger;
 import com.gemstone.gemfire.management.internal.cli.LogWrapper;
-import com.gemstone.org.jgroups.Event;
-import com.gemstone.org.jgroups.JChannel;
-import com.gemstone.org.jgroups.stack.IpAddress;
-import com.gemstone.org.jgroups.stack.Protocol;
-import com.gemstone.org.jgroups.util.GemFireTracer;
 
 import dunit.standalone.DUnitLauncher;
 
@@ -544,19 +538,7 @@ public abstract class DistributedTestCase extends TestCase implements java.io.Se
    * test with disconnectFromDS() or disconnectAllFromDS().
    */
   public void crashDistributedSystem(final DistributedSystem msys) {
-    MembershipManagerHelper.inhibitForcedDisconnectLogging(true);
-    MembershipManagerHelper.playDead(msys);
-    JChannel c = MembershipManagerHelper.getJChannel(msys);
-    Protocol udp = c.getProtocolStack().findProtocol("UDP");
-    udp.stop();
-    udp.passUp(new Event(Event.EXIT, new RuntimeException("killing member's ds")));
-    try {
-      MembershipManagerHelper.getJChannel(msys).waitForClose();
-    }
-    catch (InterruptedException ie) {
-      Thread.currentThread().interrupt();
-      // attempt rest of work with interrupt bit set
-    }
+    MembershipManagerHelper.crashDistributedSystem(msys);
     MembershipManagerHelper.inhibitForcedDisconnectLogging(false);
     WaitCriterion wc = new WaitCriterion() {
       public boolean done() {
@@ -765,7 +747,6 @@ public abstract class DistributedTestCase extends TestCase implements java.io.Se
 
 
   private static void cleanupThisVM() {
-    IpAddress.resolve_dns = true;
     SocketCreator.resolve_dns = true;
     InitialImageOperation.slowImageProcessing = 0;
     DistributionMessageObserver.setInstance(null);
@@ -779,8 +760,6 @@ public abstract class DistributedTestCase extends TestCase implements java.io.Se
     InternalBridgeMembership.unregisterAllListeners();
     ClientStatsManager.cleanupForTests();
     unregisterInstantiatorsInThisVM();
-    GemFireTracer.DEBUG = Boolean.getBoolean("DistributionManager.DEBUG_JAVAGROUPS");
-    Protocol.trace = GemFireTracer.DEBUG;
     DistributionMessageObserver.setInstance(null);
     QueryObserverHolder.reset();
     if (InternalDistributedSystem.systemAttemptingReconnect != null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/test/java/hydra/log/AnyLogWriter.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/hydra/log/AnyLogWriter.java b/gemfire-core/src/test/java/hydra/log/AnyLogWriter.java
index a6c6607..2cf7ee7 100644
--- a/gemfire-core/src/test/java/hydra/log/AnyLogWriter.java
+++ b/gemfire-core/src/test/java/hydra/log/AnyLogWriter.java
@@ -15,7 +15,7 @@ import com.gemstone.gemfire.i18n.LogWriterI18n;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
 import com.gemstone.gemfire.internal.logging.LogWriterImpl;
-import com.gemstone.org.jgroups.util.StringId;
+import com.gemstone.gemfire.i18n.StringId;
 
 import java.io.*;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/util/GemFireTracer.java
----------------------------------------------------------------------
diff --git a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/util/GemFireTracer.java b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/util/GemFireTracer.java
index ff15c12..c9db84a 100755
--- a/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/util/GemFireTracer.java
+++ b/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/util/GemFireTracer.java
@@ -25,7 +25,7 @@ import org.apache.logging.log4j.core.config.ConfigurationFactory;
  */
 public class GemFireTracer  {
     /** whether jgroups debugging should be turned on */
-    public static boolean DEBUG = Boolean.getBoolean("JGroups.DEBUG");
+    public static boolean DEBUG = true; //Boolean.getBoolean("JGroups.DEBUG");
     
     private static Logger logger;
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 7f6ed61..c929cf0 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,6 +1,5 @@
 rootProject.name = 'gemfire'
 
-include 'gemfire-jgroups'
 include 'gemfire-joptsimple'
 include 'gemfire-json'
 include 'gemfire-junit'


Mime
View raw message