geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sai_boorlaga...@apache.org
Subject [04/50] [abbrv] incubator-geode git commit: GEODE-1129: DistributionManagerDUnitTest.testAckSevereAlertThreshold is disabled
Date Mon, 28 Mar 2016 17:45:11 GMT
GEODE-1129: DistributionManagerDUnitTest.testAckSevereAlertThreshold is disabled

Reenabling the test and altering the beSick test-hook to no longer disable
accepting of TCP/IP connections but, instead, buffer cache operations in
the membership manager to cause severe-alerts to be issued.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/bcff8428
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/bcff8428
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/bcff8428

Branch: refs/heads/feature/GEODE-52
Commit: bcff8428a418d7fec1b3bc0c2a3b712288134901
Parents: d655d27
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Fri Mar 25 09:17:47 2016 -0700
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Fri Mar 25 09:18:53 2016 -0700

----------------------------------------------------------------------
 .../membership/gms/mgr/GMSMembershipManager.java     | 15 +++++++++++++--
 .../gemstone/gemfire/internal/tcp/TCPConduit.java    |  6 +++---
 .../internal/DistributionManagerDUnitTest.java       |  4 +---
 3 files changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bcff8428/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
index 3d554fa..7ba52cf 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
@@ -86,6 +86,7 @@ import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
 import com.gemstone.gemfire.internal.cache.CacheServerImpl;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.partitioned.PartitionMessageWithDirectReply;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheServerCreation;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -1048,6 +1049,13 @@ public class GMSMembershipManager implements MembershipManager, Manager
    */
   protected void handleOrDeferMessage(DistributionMessage msg) {
     synchronized(startupLock) {
+      if (beingSick || playingDead) {
+        // cache operations are blocked in a "sick" member
+        if (msg.containsRegionContentChange() || msg instanceof PartitionMessageWithDirectReply)
{
+          startupMessages.add(new StartupEvent(msg));
+          return;
+        }
+      }
       if (!processingEvents) {
         startupMessages.add(new StartupEvent(msg));
         return;
@@ -2477,8 +2485,11 @@ public class GMSMembershipManager implements MembershipManager, Manager
    */
   public synchronized void beHealthy() {
     if (beingSick || playingDead) {
-      beingSick = false;
-      playingDead = false;
+      synchronized(startupMutex) {
+        beingSick = false;
+        playingDead = false;
+        startEventProcessing();
+      }
       logger.info("GroupMembershipService.beHealthy invoked for {} - recovering health now",
this.address);
       if (directChannel != null) {
         directChannel.beHealthy();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bcff8428/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
index 41e5837..9cb1400 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
@@ -1192,15 +1192,15 @@ public class TCPConduit implements Runnable {
    * simulate being sick
    */
   public void beSick() {
-    this.inhibitNewConnections = true;
-    this.conTable.closeReceivers(true);
+//    this.inhibitNewConnections = true;
+//    this.conTable.closeReceivers(true);
   }
   
   /**
    * simulate being healthy
    */
   public void beHealthy() {
-    this.inhibitNewConnections = false;
+//    this.inhibitNewConnections = false;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bcff8428/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
index 81d35d4..d1487ee 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
@@ -256,9 +256,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase
{
    * region that sleeps when notified, forcing the operation to take longer
    * than ack-wait-threshold + ack-severe-alert-threshold
    */
-  // DISABLED due to a high rate of failure in CI test runs.  See internal
-  // ticket #52319
-  public void disabledtestAckSevereAlertThreshold() throws Exception {
+  public void testAckSevereAlertThreshold() throws Exception {
     disconnectAllFromDS();
     Host host = Host.getHost(0);
 //    VM vm0 = host.getVM(0);


Mime
View raw message