You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/04/18 18:35:22 UTC

[1/2] incubator-geode git commit: Applying FlakyTest category with basic comments about the flakiness of the test

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-1233 877b5de8b -> 03f30486e


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientSimpleDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientSimpleDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientSimpleDUnitTest.java
index 0a263eb..3812ea0 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientSimpleDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientSimpleDUnitTest.java
@@ -1,25 +1,26 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.internal.cache.tier.sockets;
 
 import java.util.Iterator;
-
-import org.junit.Ignore;
-
+
+import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.InterestResultPolicy;
 import com.gemstone.gemfire.cache.Region;
@@ -36,21 +37,22 @@ import com.gemstone.gemfire.cache.query.CqQuery;
 import com.gemstone.gemfire.cache.query.QueryService;
 import com.gemstone.gemfire.cache.query.RegionNotFoundException;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.cache.ClientServerObserver;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.ClientServerObserver;
+import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
+import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
 import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
 
@@ -184,7 +186,7 @@ public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
     });
     
     // Stop the durable client
-    this.durableClientVM.invoke(() -> CacheServerTestUtil.closeCache());
+    this.durableClientVM.invoke(() -> CacheServerTestUtil.closeCache());
     
     // Verify the durable client is no longer on the server
     this.server1VM.invoke(new CacheSerializableRunnable("Verify durable client") {
@@ -303,7 +305,7 @@ public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
     this.publisherClientVM.invoke(() -> CacheServerTestUtil.closeCache());
     
     // Stop the durable client
-    this.durableClientVM.invoke(() -> CacheServerTestUtil.closeCache());
+    this.durableClientVM.invoke(() -> CacheServerTestUtil.closeCache());
     
     // Stop the server
     this.server1VM.invoke(() -> CacheServerTestUtil.closeCache());
@@ -369,17 +371,17 @@ public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
     });
     
     // Stop the durable clients
-    this.durableClientVM.invoke(() -> CacheServerTestUtil.closeCache());
+    this.durableClientVM.invoke(() -> CacheServerTestUtil.closeCache());
     durableClient2VM.invoke(() -> CacheServerTestUtil.closeCache());
     
     // Stop the server
     this.server1VM.invoke(() -> CacheServerTestUtil.closeCache());
-  }
-  
+  }
+  
   /**
    * Test that starting a durable client on multiple servers (one live and one
    * not live) is processed correctly.
-   */
+   */
   @Ignore("Disabled for bug 52043")
   public void DISABLED_testDurableClientMultipleServersOneLive() {
     // Start server 1
@@ -1070,7 +1072,7 @@ public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
     });
     
     // Stop the durable clients
-    this.durableClientVM.invoke(() -> CacheServerTestUtil.closeCache());
+    this.durableClientVM.invoke(() -> CacheServerTestUtil.closeCache());
 
     // Stop the server
     this.server1VM.invoke(() -> CacheServerTestUtil.closeCache());
@@ -1079,8 +1081,8 @@ public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
   //This test method is disabled because it is failing
   //periodically and causing cruise control failures
   //See bug #47060
-  public void testReadyForEventsNotCalledImplicitlyWithCacheXML() {
-    try {
+  public void testReadyForEventsNotCalledImplicitlyWithCacheXML() {
+    try {
       setPeriodicACKObserver(durableClientVM);
       final String cqName = "cqTest";
       // Start a server
@@ -1311,38 +1313,38 @@ public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
       this.durableClientVM.invoke(() -> CacheServerTestUtil.closeCache());
   
       // Stop the server
-      this.server1VM.invoke(() -> CacheServerTestUtil.closeCache());
-    }finally{
-      unsetPeriodicACKObserver(durableClientVM);
+      this.server1VM.invoke(() -> CacheServerTestUtil.closeCache());
+    }finally{
+      unsetPeriodicACKObserver(durableClientVM);
     }
-  }
-  
-  private void setPeriodicACKObserver(VM vm){
-    CacheSerializableRunnable cacheSerializableRunnable = new CacheSerializableRunnable("Set ClientServerObserver"){
-      @Override
-      public void run2() throws CacheException {
-        PoolImpl.BEFORE_SENDING_CLIENT_ACK_CALLBACK_FLAG = true;
-        ClientServerObserver origObserver = ClientServerObserverHolder.setInstance(new ClientServerObserverAdapter() {
-          public void beforeSendingClientAck()
-          {
-            LogWriterUtils.getLogWriter().info("beforeSendingClientAck invoked");
-           
-          }
-        });
-        
-      }
-    };
-    vm.invoke(cacheSerializableRunnable);
-  }
-  
-  private void unsetPeriodicACKObserver(VM vm){
-    CacheSerializableRunnable cacheSerializableRunnable = new CacheSerializableRunnable("Unset ClientServerObserver"){
-      @Override
-      public void run2() throws CacheException {
-        PoolImpl.BEFORE_SENDING_CLIENT_ACK_CALLBACK_FLAG = false;        
-      }
-    };
-    vm.invoke(cacheSerializableRunnable);
+  }
+  
+  private void setPeriodicACKObserver(VM vm){
+    CacheSerializableRunnable cacheSerializableRunnable = new CacheSerializableRunnable("Set ClientServerObserver"){
+      @Override
+      public void run2() throws CacheException {
+        PoolImpl.BEFORE_SENDING_CLIENT_ACK_CALLBACK_FLAG = true;
+        ClientServerObserver origObserver = ClientServerObserverHolder.setInstance(new ClientServerObserverAdapter() {
+          public void beforeSendingClientAck()
+          {
+            LogWriterUtils.getLogWriter().info("beforeSendingClientAck invoked");
+           
+          }
+        });
+        
+      }
+    };
+    vm.invoke(cacheSerializableRunnable);
+  }
+  
+  private void unsetPeriodicACKObserver(VM vm){
+    CacheSerializableRunnable cacheSerializableRunnable = new CacheSerializableRunnable("Unset ClientServerObserver"){
+      @Override
+      public void run2() throws CacheException {
+        PoolImpl.BEFORE_SENDING_CLIENT_ACK_CALLBACK_FLAG = false;        
+      }
+    };
+    vm.invoke(cacheSerializableRunnable);
   }
   
   public void testReadyForEventsNotCalledImplicitlyForRegisterInterestWithCacheXML() {
@@ -2822,7 +2824,7 @@ public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
    * The client should be rejected until no cqs are currently being drained
    * @throws Exception
    */
-  public void testRejectClientWhenDrainingCq() throws Exception {
+  public void testRejectClientWhenDrainingCq() throws Exception {
     try {
       IgnoredException.addIgnoredException(LocalizedStrings.CacheClientNotifier_COULD_NOT_CONNECT_DUE_TO_CQ_BEING_DRAINED.toLocalizedString());
       IgnoredException.addIgnoredException("Could not initialize a primary queue on startup. No queue servers available.");
@@ -2856,15 +2858,15 @@ public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
       startClient(publisherClientVM, serverPort, regionName);
     
       // Publish some entries
-      publishEntries(publisherClientVM, regionName, 10);
-      
-      this.server1VM.invoke(new CacheSerializableRunnable(
-          "Set test hook") {
-        public void run2() throws CacheException {
-          //Set the Test Hook!
-          //This test hook will pause during the drain process
-          CacheClientProxy.testHook = new RejectClientReconnectTestHook();
-        }
+      publishEntries(publisherClientVM, regionName, 10);
+      
+      this.server1VM.invoke(new CacheSerializableRunnable(
+          "Set test hook") {
+        public void run2() throws CacheException {
+          //Set the Test Hook!
+          //This test hook will pause during the drain process
+          CacheClientProxy.testHook = new RejectClientReconnectTestHook();
+        }
       });
               
       this.server1VM.invokeAsync(new CacheSerializableRunnable(
@@ -2928,14 +2930,14 @@ public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
       this.publisherClientVM.invoke(() -> CacheServerTestUtil.closeCache());
   
       // Stop the server
-      this.server1VM.invoke(() -> CacheServerTestUtil.closeCache());
-    }finally{
-      this.server1VM.invoke(new CacheSerializableRunnable(
-          "unset test hook") {
-        public void run2() throws CacheException {
-          CacheClientProxy.testHook = null;
-        }
-      });
+      this.server1VM.invoke(() -> CacheServerTestUtil.closeCache());
+    }finally{
+      this.server1VM.invoke(new CacheSerializableRunnable(
+          "unset test hook") {
+        public void run2() throws CacheException {
+          CacheClientProxy.testHook = null;
+        }
+      });
     }
   }
   
@@ -2945,7 +2947,8 @@ public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
    * being reactivated
    * @throws Exception
    */
-  public void testCqCloseExceptionDueToActivatingClient() throws Exception {
+  @Category(FlakyTest.class) // GEODE-1060
+  public void testCqCloseExceptionDueToActivatingClient() throws Exception {
     try {
       String greaterThan5Query = "select * from /" + regionName + " p where p.ID > 5";
       String allQuery = "select * from /" + regionName + " p where p.ID > -1";
@@ -3030,14 +3033,14 @@ public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
       this.publisherClientVM.invoke(() -> CacheServerTestUtil.closeCache());
   
       // Stop the server
-      this.server1VM.invoke(() -> CacheServerTestUtil.closeCache());
-    }finally {
-      this.server1VM.invoke(new CacheSerializableRunnable(
-          "unset test hook") {
-        public void run2() throws CacheException {
-          CacheClientProxy.testHook = null;
-        }
-      });
+      this.server1VM.invoke(() -> CacheServerTestUtil.closeCache());
+    }finally {
+      this.server1VM.invoke(new CacheSerializableRunnable(
+          "unset test hook") {
+        public void run2() throws CacheException {
+          CacheClientProxy.testHook = null;
+        }
+      });
     }
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
index d3ec953..005077a 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
@@ -595,7 +595,7 @@ public void waitForListClientMbean2(){
   
   }
 
-  @Category(FlakyTest.class) // GEODE-908
+  @Category(FlakyTest.class) // GEODE-908: time sensitive
   @Test
   public void testListClient() throws Exception {
     setupSystemForListClient();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
index 9ab6e81..bc6bfe4 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
@@ -55,6 +55,7 @@ import com.gemstone.gemfire.internal.cache.BucketNotFoundException;
 import com.gemstone.gemfire.internal.cache.EvictionAttributesImpl;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.jayway.awaitility.Awaitility;
 
@@ -121,6 +122,7 @@ public class LuceneIndexRecoveryHAJUnitTest {
     Assert.assertNotEquals(newRepo, repo);
   }
 
+  @Category(FlakyTest.class) // GEODE-1012
   @Test
   public void recoverPersistentIndex() throws Exception {
     String aeqId = LuceneServiceImpl.getUniqueIndexName(INDEX, REGION);
@@ -166,6 +168,7 @@ public class LuceneIndexRecoveryHAJUnitTest {
     userRegion.destroyRegion();
   }
 
+  @Category(FlakyTest.class) // GEODE-1013
   @Test
   public void overflowRegionIndex() throws Exception {
     String aeqId = LuceneServiceImpl.getUniqueIndexName(INDEX, REGION);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/cache/CacheXml70GatewayDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/cache/CacheXml70GatewayDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/cache/CacheXml70GatewayDUnitTest.java
index e9a47e2..9032a3e 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/cache/CacheXml70GatewayDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/cache/CacheXml70GatewayDUnitTest.java
@@ -20,6 +20,8 @@ import java.io.IOException;
 import java.util.Properties;
 import java.util.Set;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
 import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
 import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueueFactory;
@@ -40,6 +42,7 @@ import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
 import com.gemstone.gemfire.internal.cache.xmlcache.ParallelGatewaySenderCreation;
 import com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation;
 import com.gemstone.gemfire.internal.cache.xmlcache.SerialGatewaySenderCreation;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class CacheXml70GatewayDUnitTest extends CacheXmlTestCase {
 
@@ -87,8 +90,9 @@ public class CacheXml70GatewayDUnitTest extends CacheXmlTestCase {
       CacheXml70DUnitTest.validateAsyncEventQueue(asyncEventQueue, asyncEventQueueOnCache);
     }
   }
-  
-  public void testGatewayReceiver() throws CacheException{
+
+  @Category(FlakyTest.class) // GEODE-978: hardcoded port range
+  public void testGatewayReceiver() throws Exception{
     getSystem();
     CacheCreation cache = new CacheCreation();
     
@@ -103,12 +107,9 @@ public class CacheXml70GatewayDUnitTest extends CacheXmlTestCase {
     GatewayTransportFilter myStreamfilter2 = new MyGatewayTransportFilter2();
     gatewayReceiverFactory.addGatewayTransportFilter(myStreamfilter2);
     GatewayReceiver receiver1 = gatewayReceiverFactory.create();
-    try {
-      receiver1.start();
-    }
-    catch (IOException e) {
-      fail("Could not start GatewayReceiver");
-    }
+
+    receiver1.start();
+
     testXml(cache);
     Cache c = getCache();
     assertNotNull(c);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
index 9557f0d..83c8b78 100755
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
@@ -19,6 +19,8 @@ package com.gemstone.gemfire.internal.cache.wan;
 import java.io.IOException;
 import java.util.List;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.DiskStore;
 import com.gemstone.gemfire.cache.EvictionAction;
 import com.gemstone.gemfire.cache.EvictionAttributes;
@@ -40,6 +42,7 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class CacheClientNotifierDUnitTest extends WANTestBase {
   private static final int NUM_KEYS = 10;
@@ -162,6 +165,7 @@ public class CacheClientNotifierDUnitTest extends WANTestBase {
    * The test will start several cache servers, including gateway receivers.
    * Shutdown them and verify the CacheClientNofifier for each server is correct
    */
+  @Category(FlakyTest.class) // GEODE-1183
   public void testMultipleCacheServer() throws Exception {
     /* test senario: */
     /* create 1 GatewaySender on vm0 */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_1_DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_1_DUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_1_DUnitTest.java
index ddcb3d6..069ce7a 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_1_DUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderOperation_1_DUnitTest.java
@@ -16,12 +16,15 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.concurrent;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
 import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  *
@@ -577,6 +580,7 @@ public class ConcurrentParallelGatewaySenderOperation_1_DUnitTest extends WANTes
    * Normal scenario in which a sender is stopped and then started again on accessor node.
    * @throws Exception
    */
+  @Category(FlakyTest.class) // GEODE-1011
   public void testParallelPropagationSenderStartAfterStopOnAccessorNode() throws Throwable {
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
     Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_2_DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_2_DUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_2_DUnitTest.java
index a9b4b9d..54385a2 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_2_DUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_2_DUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.concurrent;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.EntryExistsException;
 import com.gemstone.gemfire.cache.client.ServerOperationException;
@@ -26,23 +28,21 @@ import com.gemstone.gemfire.internal.cache.wan.WANTestBase.MyGatewayEventFilter;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * All the test cases are similar to SerialWANPropogationDUnitTest except that
  * the we create concurrent serial GatewaySender with concurrency of 4
- *
  */
 public class ConcurrentWANPropogation_2_DUnitTest extends WANTestBase {
 
-  /**
-   * @param name
-   */
   public ConcurrentWANPropogation_2_DUnitTest(String name) {
     super(name);
   }
 
   private static final long serialVersionUID = 1L;
-  
+
+  @Category(FlakyTest.class) // GEODE-1121
   public void testSerialReplicatedWanWithOverflow() {
 
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
index 5f81d1f..9c472a1 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
@@ -16,11 +16,14 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.misc;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class WANSSLDUnitTest extends WANTestBase{
 
@@ -28,6 +31,7 @@ public class WANSSLDUnitTest extends WANTestBase{
     super(name);
   }
 
+  @Category(FlakyTest.class) // GEODE-1207
   public void testSenderSSLReceiverSSL(){
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
     Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanValidationsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanValidationsDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanValidationsDUnitTest.java
index cb013ef..9d80b14 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanValidationsDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WanValidationsDUnitTest.java
@@ -19,6 +19,8 @@ package com.gemstone.gemfire.internal.cache.wan.misc;
 import java.util.ArrayList;
 import java.util.Map;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.client.ServerOperationException;
 import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
 import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
@@ -34,6 +36,7 @@ import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class WanValidationsDUnitTest extends WANTestBase {
 
@@ -1248,7 +1251,8 @@ public class WanValidationsDUnitTest extends WANTestBase {
       }
     }
   }
-  
+
+  @Category(FlakyTest.class) // GEODE-1019
   public void testBug50434_PR_Parallel_pass() throws Exception {
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
     Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/offheap/SerialWANPropogationOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/offheap/SerialWANPropogationOffHeapDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/offheap/SerialWANPropogationOffHeapDUnitTest.java
index 1bcb879..e7ac75f 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/offheap/SerialWANPropogationOffHeapDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/offheap/SerialWANPropogationOffHeapDUnitTest.java
@@ -19,8 +19,7 @@ package com.gemstone.gemfire.internal.cache.wan.offheap;
 import com.gemstone.gemfire.internal.cache.wan.serial.SerialWANPropogationDUnitTest;
 
 @SuppressWarnings("serial")
-public class SerialWANPropogationOffHeapDUnitTest extends
-    SerialWANPropogationDUnitTest {
+public class SerialWANPropogationOffHeapDUnitTest extends SerialWANPropogationDUnitTest {
 
   public SerialWANPropogationOffHeapDUnitTest(String name) {
     super(name);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/offheap/SerialWANPropogation_PartitionedRegionOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/offheap/SerialWANPropogation_PartitionedRegionOffHeapDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/offheap/SerialWANPropogation_PartitionedRegionOffHeapDUnitTest.java
index a689eef..4b45bb6 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/offheap/SerialWANPropogation_PartitionedRegionOffHeapDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/offheap/SerialWANPropogation_PartitionedRegionOffHeapDUnitTest.java
@@ -19,8 +19,7 @@ package com.gemstone.gemfire.internal.cache.wan.offheap;
 import com.gemstone.gemfire.internal.cache.wan.serial.SerialWANPropogation_PartitionedRegionDUnitTest;
 
 @SuppressWarnings("serial")
-public class SerialWANPropogation_PartitionedRegionOffHeapDUnitTest extends
-    SerialWANPropogation_PartitionedRegionDUnitTest {
+public class SerialWANPropogation_PartitionedRegionOffHeapDUnitTest extends SerialWANPropogation_PartitionedRegionDUnitTest {
 
   public SerialWANPropogation_PartitionedRegionOffHeapDUnitTest(String name) {
     super(name);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
index 3f0329a..50ee029 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
@@ -18,6 +18,7 @@ package com.gemstone.gemfire.internal.cache.wan.parallel;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.GemFireIOException;
 import com.gemstone.gemfire.cache.Region;
@@ -33,6 +34,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.RMIException;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * DUnit test for operations on ParallelGatewaySender
@@ -255,6 +257,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase {
    * Normal scenario in which a sender is stopped and then started again.
    * @throws Exception
    */
+  @Category(FlakyTest.class) // GEODE-933: pause sleeps, random ports, async actions
   public void testParallelPropagationSenderStartAfterStop() throws Exception {
     IgnoredException.addIgnoredException("Broken pipe");
     Integer[] locatorPorts = createLNAndNYLocators();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
index 8139dca..cee3234 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java
@@ -18,6 +18,8 @@ package com.gemstone.gemfire.internal.cache.wan.parallel;
 
 import java.io.IOException;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 import com.gemstone.gemfire.cache.Region;
@@ -31,6 +33,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallableIF;
 import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class ParallelWANPersistenceEnabledGatewaySenderDUnitTest extends
     WANTestBase {
@@ -448,6 +451,7 @@ public class ParallelWANPersistenceEnabledGatewaySenderDUnitTest extends
    * Dispatcher should not start dispatching events recovered from persistent sender.
    * Check if the remote site receives all the events.
    */
+  @Category(FlakyTest.class) // GEODE-1124
   public void testPersistentPRWithGatewaySenderPersistenceEnabled_Restart2() {
     //create locator on local site
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationDUnitTest.java
index 6d4b03a..a1c820b 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationDUnitTest.java
@@ -20,6 +20,8 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.EntryExistsException;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.client.ServerOperationException;
@@ -36,6 +38,7 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallableIF;
 import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class ParallelWANPropagationDUnitTest extends WANTestBase {
   private static final long serialVersionUID = 1L;
@@ -684,6 +687,7 @@ public class ParallelWANPropagationDUnitTest extends WANTestBase {
         getTestMethodName() + "_PR", 1000 ));
   }
 
+  @Category(FlakyTest.class) // GEODE-1180
   public void testPartitionedParallelPropagationHA() throws Exception {
     IgnoredException.addIgnoredException("Broken pipe");
     IgnoredException.addIgnoredException("Connection reset");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
index 9d9c074..b876521 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
@@ -23,9 +23,12 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class ParallelWANStatsDUnitTest extends WANTestBase{
   
@@ -290,6 +293,7 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
     assertTrue(v4List.get(5) + v5List.get(5) + v6List.get(5) + v7List.get(5) >= 1); //batches redistributed
   }
 
+  @Category(FlakyTest.class) // GEODE-977: random ports and relies on stats
   public void testParallelPropogationWithFilter() throws Exception {
 
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventListenerDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventListenerDUnitTest.java
index 7f69904..5d76161 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventListenerDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventListenerDUnitTest.java
@@ -21,6 +21,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
 import com.gemstone.gemfire.cache.wan.GatewaySender;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
@@ -30,6 +32,7 @@ import com.gemstone.gemfire.internal.cache.wan.MyGatewaySenderEventListener2;
 import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  *
@@ -150,6 +153,7 @@ public class SerialGatewaySenderEventListenerDUnitTest extends WANTestBase {
    * Test validates whether the listener attached receives all the events. 
    * When there are 2 listeners attcahed to the GatewaySender.
    */
+  @Category(FlakyTest.class) // GEODE-1066
   public void testGatewaySender2EventListenerInvocation() {
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
     Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropagationLoopBackDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropagationLoopBackDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropagationLoopBackDUnitTest.java
index 8cc50de..a869d18 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropagationLoopBackDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropagationLoopBackDUnitTest.java
@@ -20,8 +20,11 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 
 public class SerialWANPropagationLoopBackDUnitTest extends WANTestBase {
@@ -121,7 +124,7 @@ public class SerialWANPropagationLoopBackDUnitTest extends WANTestBase {
     assertEquals(1, createList2.size());
   }
   
-  
+  @Category(FlakyTest.class) // GEODE-1148
   public void testReplicatedSerialPropagationLoopBack3SitesLoop() throws Exception {
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
     Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
index e6be1d5..36de8b3 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
@@ -19,6 +19,8 @@ package com.gemstone.gemfire.internal.cache.wan.serial;
 import java.io.IOException;
 import java.util.Map;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.EntryExistsException;
 import com.gemstone.gemfire.cache.client.ServerOperationException;
@@ -30,6 +32,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class SerialWANPropogationDUnitTest extends WANTestBase {
 
@@ -97,7 +100,7 @@ public class SerialWANPropogationDUnitTest extends WANTestBase {
         getTestMethodName() + "_RR", "ln", isOffHeap()   );
   }
 
-  
+  @Category(FlakyTest.class) // GEODE-935 AND GEODE-1062: time sensitive, random ports, thread sleeps
   public void testReplicatedSerialPropagation_withoutRemoteSite() throws Exception {
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
 
@@ -956,8 +959,8 @@ public class SerialWANPropogationDUnitTest extends WANTestBase {
     vm6.invoke(() -> WANTestBase.checkMinimumGatewayReceiverStats( 1, 1 ));
   }
 
-  public void testReplicatedSerialPropagationWithRemoteReceiverRestartedOnOtherNode()
-      throws Exception {
+  @Category(FlakyTest.class) // GEODE-975 AND GEODE-1032: random ports, 8 second WaitCriterions, async actions
+  public void testReplicatedSerialPropagationWithRemoteReceiverRestartedOnOtherNode() throws Exception {
     Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
     Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
 
@@ -996,13 +999,8 @@ public class SerialWANPropogationDUnitTest extends WANTestBase {
     // receivers.
     vm2.invoke(() -> WANTestBase.closeCache());
     vm3.invoke(() -> WANTestBase.closeCache());
-    
-    try {
-      inv1.join();
-    } catch (InterruptedException e) {
-      e.printStackTrace();
-      fail();
-    }
+
+    inv1.join();
 
     // verify that all is well in local site
     vm4.invoke(() -> WANTestBase.validateRegionSize(

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogation_PartitionedRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogation_PartitionedRegionDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogation_PartitionedRegionDUnitTest.java
index b6d0ee4..2a24728 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogation_PartitionedRegionDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogation_PartitionedRegionDUnitTest.java
@@ -17,12 +17,15 @@
 package com.gemstone.gemfire.internal.cache.wan.serial;
 
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.CancelException;
 import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
 import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class SerialWANPropogation_PartitionedRegionDUnitTest extends WANTestBase {
 
@@ -350,8 +353,8 @@ public class SerialWANPropogation_PartitionedRegionDUnitTest extends WANTestBase
         getTestMethodName() + "_PR", 1000 ));
   }
 
-  public void testPartitionedSerialPropagationWithParallelThreads()
-      throws Exception {
+  @Category(FlakyTest.class) // GEODE-1147
+  public void testPartitionedSerialPropagationWithParallelThreads() throws Exception {
 
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
     Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));



[2/2] incubator-geode git commit: Applying FlakyTest category with basic comments about the flakiness of the test

Posted by kl...@apache.org.
Applying FlakyTest category with basic comments about the flakiness of the test


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

Branch: refs/heads/feature/GEODE-1233
Commit: 03f30486e5891d682b93cd8a7e76688bcadbc69c
Parents: 877b5de
Author: Kirk Lund <kl...@apache.org>
Authored: Mon Apr 18 09:34:35 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Mon Apr 18 09:34:35 2016 -0700

----------------------------------------------------------------------
 .../SessionReplicationIntegrationJUnitTest.java |   5 +
 .../com/gemstone/gemfire/TXExpiryJUnitTest.java |   2 +
 .../pooling/ConnectionManagerJUnitTest.java     |   8 +-
 .../management/MemoryThresholdsDUnitTest.java   |   3 +
 .../management/ResourceManagerDUnitTest.java    |   3 +
 .../dunit/QueryDataInconsistencyDUnitTest.java  |   8 +-
 .../query/dunit/QueryUsingPoolDUnitTest.java    |   3 +
 .../QueryREUpdateInProgressJUnitTest.java       |   3 +-
 ...itializeIndexEntryDestroyQueryDUnitTest.java |   8 +-
 .../partitioned/PRQueryCacheCloseDUnitTest.java |  29 +--
 .../gemfire/cache30/Bug44418JUnitTest.java      |   3 +-
 .../cache30/ClientMembershipDUnitTest.java      |   4 +
 .../DiskDistributedNoAckRegionTestCase.java     |   7 +-
 .../DistributedAckRegionCCEDUnitTest.java       |  61 +++---
 .../DistributedNoAckRegionCCEDUnitTest.java     |  68 ++++---
 .../DistributedNoAckRegionDUnitTest.java        |   3 +-
 .../gemfire/cache30/MultiVMRegionTestCase.java  |   3 +
 .../gemfire/distributed/LocatorDUnitTest.java   |   5 +
 .../ServerLauncherRemoteJUnitTest.java          |   5 +-
 .../gemfire/disttx/DistTXExpiryJUnitTest.java   |   1 -
 ...hreadPoolExecutorWithKeepAliveJUnitTest.java |   2 +-
 .../cache/FixedPRSinglehopDUnitTest.java        |   4 +
 .../internal/cache/GIIDeltaDUnitTest.java       |   5 +
 .../cache/NetSearchMessagingDUnitTest.java      |  12 +-
 .../PartitionedRegionCreationDUnitTest.java     |   4 +
 ...rtitionedRegionDelayedRecoveryDUnitTest.java |   8 +-
 .../PartitionedRegionSingleHopDUnitTest.java    |   3 +
 .../PRFunctionExecutionTimeOutDUnitTest.java    |   4 +
 ...tentColocatedPartitionedRegionDUnitTest.java |   7 +-
 .../PersistentPartitionedRegionDUnitTest.java   |   3 +-
 .../DestroyEntryPropagationDUnitTest.java       |  12 +-
 .../sockets/HAStartupAndFailoverDUnitTest.java  |   4 +
 ...ersalMembershipListenerAdapterDUnitTest.java |   1 +
 ...eateAlterDestroyRegionCommandsDUnitTest.java |   2 +-
 .../ListAndDescribeRegionDUnitTest.java         |   2 +
 .../cli/commands/ShellCommandsDUnitTest.java    |   2 +
 .../GemcachedDevelopmentJUnitTest.java          |   2 +
 .../gemfire/redis/RedisDistDUnitTest.java       |   3 +
 .../security/ClientAuthenticationDUnitTest.java |   2 +
 .../security/P2PAuthenticationDUnitTest.java    |   3 +
 .../cache/query/cq/dunit/CqPerfDUnitTest.java   |   4 +
 .../cq/dunit/CqPerfUsingPoolDUnitTest.java      |   7 +-
 .../query/cq/dunit/PrCqUsingPoolDUnitTest.java  |   5 +
 .../sockets/DurableClientSimpleDUnitTest.java   | 201 ++++++++++---------
 .../cli/commands/ClientCommandsDUnitTest.java   |   2 +-
 .../LuceneIndexRecoveryHAJUnitTest.java         |   3 +
 .../cache/CacheXml70GatewayDUnitTest.java       |  17 +-
 .../cache/wan/CacheClientNotifierDUnitTest.java |   4 +
 ...allelGatewaySenderOperation_1_DUnitTest.java |   4 +
 .../ConcurrentWANPropogation_2_DUnitTest.java   |  10 +-
 .../cache/wan/misc/WANSSLDUnitTest.java         |   4 +
 .../cache/wan/misc/WanValidationsDUnitTest.java |   6 +-
 .../SerialWANPropogationOffHeapDUnitTest.java   |   3 +-
 ...ation_PartitionedRegionOffHeapDUnitTest.java |   3 +-
 ...arallelGatewaySenderOperationsDUnitTest.java |   3 +
 ...ersistenceEnabledGatewaySenderDUnitTest.java |   4 +
 .../ParallelWANPropagationDUnitTest.java        |   4 +
 .../wan/parallel/ParallelWANStatsDUnitTest.java |   4 +
 ...rialGatewaySenderEventListenerDUnitTest.java |   4 +
 .../SerialWANPropagationLoopBackDUnitTest.java  |   5 +-
 .../serial/SerialWANPropogationDUnitTest.java   |  18 +-
 ...NPropogation_PartitionedRegionDUnitTest.java |   7 +-
 62 files changed, 386 insertions(+), 253 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java b/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
index 0abd85e..ddb7405 100644
--- a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
+++ b/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
@@ -37,6 +37,7 @@ import javax.servlet.http.HttpSession;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.modules.session.junit.PerTestClassLoaderRunner;
 import com.gemstone.gemfire.modules.session.filter.SessionCachingFilter;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import org.apache.jasper.servlet.JspServlet;
 import org.junit.After;
@@ -356,6 +357,7 @@ public class SessionReplicationIntegrationJUnitTest {
   /**
    * Test setting an attribute to null deletes it
    */
+  @Category(FlakyTest.class) // GEODE-1015
   @Test
   public void testSetAttributeNullDeletesIt() throws Exception {
     Callback c_1 = new Callback() {
@@ -485,6 +487,7 @@ public class SessionReplicationIntegrationJUnitTest {
    * Test that invalidating a session destroys it as well as the backend
    * object.
    */
+  @Category(FlakyTest.class) // GEODE-1015
   @Test
   public void testInvalidateSession1() throws Exception {
     Callback c_1 = new Callback() {
@@ -575,6 +578,7 @@ public class SessionReplicationIntegrationJUnitTest {
   /**
    * Test that invalidating a session throws an exception on subsequent access.
    */
+  @Category(FlakyTest.class) // GEODE-1015
   @Test
   public void testInvalidateSession3() throws Exception {
     Callback c_1 = new Callback() {
@@ -1206,6 +1210,7 @@ public class SessionReplicationIntegrationJUnitTest {
   /**
    * Test that request forward dispatching works
    */
+  @Category(FlakyTest.class) // GEODE-1015
   @Test
   public void testDispatchingForward1() throws Exception {
     Callback c_1 = new Callback() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
index 937d8e4..5e371f4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
@@ -53,6 +53,7 @@ import com.gemstone.gemfire.internal.cache.TXManagerImpl;
 import com.gemstone.gemfire.internal.cache.TXStateProxy;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -326,6 +327,7 @@ public class TXExpiryJUnitTest {
     }
   }
 
+  @Category(FlakyTest.class) // GEODE-845: time sensitive, expiration
   @Test
   public void testRegionIdleExpiration() throws CacheException {
     Region<String, String> exprReg = createRegion("TXRegionIdle");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
index 1250d5a..4b8d898 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
@@ -62,13 +62,12 @@ import com.gemstone.gemfire.internal.logging.LocalLogWriter;
 import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
-/**
- *
- */
 @Category(IntegrationTest.class)
 public class ConnectionManagerJUnitTest {
+
   private static final long TIMEOUT = 30 * 1000;
   //This is added for some windows machines which think the connection expired
   //before the idle timeout due to precision issues.
@@ -228,7 +227,8 @@ public class ConnectionManagerJUnitTest {
 //    }
 //    
 //  }
-  
+
+  @Category(FlakyTest.class) // GEODE-923: time sensitive
   @Test
   public void testIdleExpiration() throws InterruptedException, AllConnectionsInUseException, NoAvailableServersException {
     final long nanoToMillis = 1000000;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
index 8f8c966..61d1e3b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
@@ -29,6 +29,7 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.junit.experimental.categories.Category;
 import util.TestException;
 
 import com.gemstone.gemfire.cache.AttributesFactory;
@@ -93,6 +94,7 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * Tests the Heap Memory thresholds of {@link ResourceManager}
@@ -566,6 +568,7 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
     prRemotePutRejection(true, false, true);
   }
 
+  @Category(FlakyTest.class) // GEODE-987
   public void testPR_RemotePutRejectionWithTx() throws Exception {
     prRemotePutRejection(false, false, true);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java
index 8c455d4..e34cc3d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/ResourceManagerDUnitTest.java
@@ -22,6 +22,7 @@ import java.util.Iterator;
 import java.util.Set;
 
 import org.apache.logging.log4j.Logger;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
@@ -66,6 +67,7 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * Tests com.gemstone.gemfire.cache.control.ResourceManager.
@@ -1129,6 +1131,7 @@ public class ResourceManagerDUnitTest extends CacheTestCase {
    * Creates a chain of three colocated PRs and then calls removeBucket
    * to make sure that all colocated buckets are removed together.
    */
+  @Category(FlakyTest.class) // GEODE-928
   public void testRemoveColocatedBuckets() {
     final String[] regionPath = new String[] {
         getUniqueName() + "-PR-0", 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
index 5d44dfd..3861c2a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryDataInconsistencyDUnitTest.java
@@ -18,6 +18,8 @@ package com.gemstone.gemfire.cache.query.dunit;
 
 import java.util.Properties;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.CacheFactory;
@@ -49,6 +51,7 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * This tests the data inconsistency during update on an index and querying the
@@ -293,7 +296,8 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
     });
     ThreadUtils.join(putThread, 200);
   }
-  
+
+  @Category(FlakyTest.class) // GEODE-925: time sensitive, async actions, short timeouts
   public void testRangeIndexWithIndexAndQueryFromCluaseMisMatch() {
     // Create caches
     Properties props = new Properties();
@@ -381,7 +385,7 @@ public class QueryDataInconsistencyDUnitTest extends CacheTestCase {
         }
       }
     });
-    ThreadUtils.join(putThread, 200);
+    ThreadUtils.join(putThread, 200); // GEODE-925 occurs here and this is very short join 200 millis
   }
 
   public void testRangeIndexWithIndexAndQueryFromCluaseMisMatch2() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
index 4a4c38d..7c52246 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
@@ -26,6 +26,7 @@ import java.util.Set;
 
 import cacheRunner.Portfolio;
 import cacheRunner.Position;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.DataSerializable;
 import com.gemstone.gemfire.DataSerializer;
@@ -58,6 +59,7 @@ import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * Tests remote (client/server) query execution.
@@ -1454,6 +1456,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
   /**
    * Tests client-server query using parameters (compiled queries).
    */
+  @Category(FlakyTest.class) // GEODE-1146
   public void testBindParamsWithMulitipleClients() throws CacheException {
 
     final String name = this.getName();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/QueryREUpdateInProgressJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/QueryREUpdateInProgressJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/QueryREUpdateInProgressJUnitTest.java
index 677321f..409578b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/QueryREUpdateInProgressJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/QueryREUpdateInProgressJUnitTest.java
@@ -44,6 +44,7 @@ import com.gemstone.gemfire.cache.query.types.ObjectType;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.LocalRegion.NonTXEntry;
 import com.gemstone.gemfire.internal.cache.RegionEntry;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**
@@ -55,7 +56,7 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
  *
  *
  */
-@Category(IntegrationTest.class)
+@Category({ IntegrationTest.class, FlakyTest.class }) // GEODE-1059
 public class QueryREUpdateInProgressJUnitTest {
 
   private static final String exampleRegionName = "exampleRegion2";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/InitializeIndexEntryDestroyQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/InitializeIndexEntryDestroyQueryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/InitializeIndexEntryDestroyQueryDUnitTest.java
index 6463e88..c4fb80b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/InitializeIndexEntryDestroyQueryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/InitializeIndexEntryDestroyQueryDUnitTest.java
@@ -18,6 +18,8 @@ package com.gemstone.gemfire.cache.query.internal.index;
 
 import java.util.Arrays;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheException;
@@ -41,6 +43,7 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * Test creates a local region. Creates and removes index in a parallel running thread.
@@ -207,6 +210,7 @@ public class InitializeIndexEntryDestroyQueryDUnitTest extends CacheTestCase {
     }
   }
 
+  @Category(FlakyTest.class) // GEODE-1036
   public void testAsyncIndexInitDuringEntryDestroyAndQueryOnPR() {
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);
@@ -332,12 +336,12 @@ public class InitializeIndexEntryDestroyQueryDUnitTest extends CacheTestCase {
       }
     });
 
-    ThreadUtils.join(asyInvk0, 1000 * 1000);
+    ThreadUtils.join(asyInvk0, 1000 * 1000); // TODO: this is way too long: 16.67 minutes!
     if (asyInvk0.exceptionOccurred()) {
       Assert.fail("asyInvk0 failed", asyInvk0.getException());
     }
     
-    ThreadUtils.join(asyInvk1, 1000 * 1000);
+    ThreadUtils.join(asyInvk1, 1000 * 1000); // TODO: this is way too long: 16.67 minutes!
     if (asyInvk1.exceptionOccurred()) {
       Assert.fail("asyInvk1 failed", asyInvk1.getException());
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
index 60fd6ff..29927b6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/partitioned/PRQueryCacheCloseDUnitTest.java
@@ -14,22 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.gemstone.gemfire.cache.query.partitioned;
 
-/**
- * This test tests the PR query behaviour with respect to cache closure
- * happening on one of the data stores. PR is configured with redundantCopies =
- * 1, and cache close is done randomly on one of the data stores and then
- * recreated, thus avoiding any data loss.
- * 
- */
-
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Properties;
 import java.util.Random;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.query.data.PortfolioData;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
@@ -40,18 +33,17 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
-public class PRQueryCacheCloseDUnitTest extends PartitionedRegionDUnitTestCase
-{
-
-  /**
-   * constructor *
-   * 
-   * @param name
-   */
+/**
+ * This test tests the PR query behaviour with respect to cache closure
+ * happening on one of the data stores. PR is configured with redundantCopies =
+ * 1, and cache close is done randomly on one of the data stores and then
+ * recreated, thus avoiding any data loss.
+ */
+public class PRQueryCacheCloseDUnitTest extends PartitionedRegionDUnitTestCase {
 
   public PRQueryCacheCloseDUnitTest(String name) {
-
     super(name);
   }
 
@@ -216,6 +208,7 @@ public class PRQueryCacheCloseDUnitTest extends PartitionedRegionDUnitTestCase
    * 6. then recreates the PR on the same VM <br>
    * 7. Verfies the size , type , contents of both the resultSets Obtained <br>
    */
+  @Category(FlakyTest.class) // GEODE-1239
   public void testPRWithCacheCloseInOneDatastoreWithoutDelay() throws Exception
   {
     LogWriterUtils.getLogWriter()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
index d74da9a..a56282c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
@@ -53,7 +53,7 @@ public class Bug44418JUnitTest {
   DistributedSystem ds;
   Cache cache;
 
-  @Category(FlakyTest.class) // GEODE-1139: time sensitive
+  @Category(FlakyTest.class) // GEODE-1139: time sensitive with sleep
   @Test
   public void testPut() throws Exception {
 
@@ -101,6 +101,7 @@ public class Bug44418JUnitTest {
     }
   }
 
+  @Category(FlakyTest.class) // GEODE-924: expiration, time sensitive, expects action in 1 second
   @Test
   public void testGet() throws Exception {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
index 639f93f..30115fa 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
@@ -30,6 +30,8 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.InternalGemFireException;
 import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.Statistics;
@@ -66,6 +68,7 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * Tests the ClientMembership API including ClientMembershipListener.
@@ -741,6 +744,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
    * server joins when the client connects to the server. If the server
    * crashes or departs gracefully, the client will detect this as a crash.
    */
+  @Category(FlakyTest.class) // GEODE-1240
   public void testClientMembershipEventsInClient() throws Exception {
     getSystem();
     IgnoredException.addIgnoredException("IOException");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckRegionTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckRegionTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckRegionTestCase.java
index 426a8da..ff6bc67 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckRegionTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DiskDistributedNoAckRegionTestCase.java
@@ -18,11 +18,8 @@ package com.gemstone.gemfire.cache30;
 
 import com.gemstone.gemfire.cache.*;
 
-/**
- *
- *
- */
 public abstract class DiskDistributedNoAckRegionTestCase extends DistributedNoAckRegionDUnitTest {
+
   final protected DiskRegionTestImpl regionTestImpl;
   
   /** Creates a new instance of DiskDistributedNoAckRegionTest */
@@ -36,6 +33,6 @@ public abstract class DiskDistributedNoAckRegionTestCase extends DistributedNoAc
   }
   
   public void testBackupFillInValues() throws CacheException {
-        this.regionTestImpl.testBackupFillValues();
+    this.regionTestImpl.testBackupFillValues();
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
index c9b9ac8..5e6d6f8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
@@ -1,20 +1,20 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 /**
  * 
  */
@@ -24,9 +24,10 @@ import java.net.UnknownHostException;
 import java.util.Collections;
 import java.util.Properties;
 import java.util.Set;
-
+
 import junit.framework.Assert;
-
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.DataPolicy;
@@ -40,7 +41,7 @@ import com.gemstone.gemfire.cache.util.GatewayConflictResolver;
 import com.gemstone.gemfire.cache.util.TimestampedEntryEvent;
 import com.gemstone.gemfire.distributed.internal.DistributionAdvisor;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.distributed.internal.membership.NetMember;
 import com.gemstone.gemfire.internal.cache.AbstractRegionEntry;
@@ -60,15 +61,16 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
 import com.gemstone.gemfire.internal.cache.versions.VMVersionTag;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.cache.vmotion.VMotionObserver;
-import com.gemstone.gemfire.internal.cache.vmotion.VMotionObserverHolder;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.internal.cache.vmotion.VMotionObserverHolder;
+import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  *
@@ -249,7 +251,7 @@ public class DistributedAckRegionCCEDUnitTest extends DistributedAckRegionDUnitT
         NetMember nm = CCRegion.getDistributionManager().getDistributionManagerId().getNetMember();
         InternalDistributedMember mbr = null;
         try {
-          mbr = new InternalDistributedMember(nm.getInetAddress().getCanonicalHostName(), nm.getPort()-1,
+          mbr = new InternalDistributedMember(nm.getInetAddress().getCanonicalHostName(), nm.getPort()-1,
               "fake_id", "fake_id_ustring", DistributionManager.NORMAL_DM_TYPE, null, null);
           tag.setMemberID(mbr);
         } catch (UnknownHostException e) {
@@ -292,6 +294,7 @@ public class DistributedAckRegionCCEDUnitTest extends DistributedAckRegionDUnitT
     z_versionTestClearWithConcurrentEvents(true);
   }
 
+  @Category(FlakyTest.class) // GEODE-1046
   public void testClearWithConcurrentEventsAsync() throws Exception {
     versionTestClearWithConcurrentEventsAsync();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
index f6836ae..a89ca24 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
@@ -1,24 +1,26 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.cache30;
 
 import java.util.Map;
 import java.util.Properties;
-
+
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.CacheListener;
@@ -31,15 +33,16 @@ import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.cache.Scope;
 import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class DistributedNoAckRegionCCEDUnitTest extends
     DistributedNoAckRegionDUnitTest {
@@ -268,14 +271,14 @@ public class DistributedNoAckRegionCCEDUnitTest extends
   }
   
   
-  public void testTombstones() throws Exception {
-//    for (int i=0; i<1000; i++) {
+  public void testTombstones() throws Exception {
+//    for (int i=0; i<1000; i++) {
 //      System.out.println("starting run #"+i);
-      versionTestTombstones();
-//      if (i < 999) {
-//        tearDown();
-//        setUp();
-//      }
+      versionTestTombstones();
+//      if (i < 999) {
+//        tearDown();
+//        setUp();
+//      }
 //    }
   }
   
@@ -361,6 +364,7 @@ public class DistributedNoAckRegionCCEDUnitTest extends
    * This tests the concurrency versioning system to ensure that event conflation
    * happens correctly and that the statistic is being updated properly
    */
+  @Category(FlakyTest.class) // GEODE-976: time sensitive with sleep, relies on stat values
   public void testConcurrentEventsOnEmptyRegion() {
     versionTestConcurrentEventsOnEmptyRegion();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java
index 538132c..64c4308 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionDUnitTest.java
@@ -45,8 +45,7 @@ import com.gemstone.gemfire.test.dunit.WaitCriterion;
  *
  * @since 3.0
  */
-public class DistributedNoAckRegionDUnitTest
-  extends MultiVMRegionTestCase {
+public class DistributedNoAckRegionDUnitTest extends MultiVMRegionTestCase {
 
   public DistributedNoAckRegionDUnitTest(String name) {
     super(name);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
index 68e50bd..e5840ca 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
@@ -47,6 +47,7 @@ import junit.framework.AssertionFailedError;
 
 import org.apache.logging.log4j.Logger;
 import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.DataSerializable;
 import com.gemstone.gemfire.DataSerializer;
@@ -127,6 +128,7 @@ import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 
 /**
@@ -1164,6 +1166,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
   /**
    * Tests that a {@link CacheListener} is invoked in a remote VM.
    */
+  @Category(FlakyTest.class) // GEODE-932: time sensitive, 3 second waitForInvocation calls
   public void testRemoteCacheListener() throws InterruptedException {
     assertTrue(getRegionAttributes().getScope().isDistributed());
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 8dfe7a5..74b56ec 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -54,6 +54,9 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Properties;
 import java.util.Set;
+
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
@@ -67,6 +70,7 @@ import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * Tests the ability of the {@link Locator} API to start and stop
@@ -1436,6 +1440,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
    * end up only have 1 master.
    * GEODE-870
    */
+  @Category(FlakyTest.class) // GEODE-1150: random ports
   public void testMultipleLocatorsRestartingAtSameTime() throws Exception {
     disconnectAllFromDS();
     Host host = Host.getHost(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteJUnitTest.java
index 5eeb04e..8a81536 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteJUnitTest.java
@@ -59,6 +59,7 @@ import com.gemstone.gemfire.internal.process.ProcessControllerFactory;
 import com.gemstone.gemfire.internal.process.ProcessStreamReader;
 import com.gemstone.gemfire.internal.process.ProcessType;
 import com.gemstone.gemfire.internal.process.ProcessUtils;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 import com.gemstone.gemfire.test.process.ProcessWrapper;
 
@@ -826,6 +827,7 @@ public class ServerLauncherRemoteJUnitTest extends AbstractServerLauncherJUnitTe
     }
   }
 
+  @Category(FlakyTest.class) // GEODE-1135: random ports and missing BindException
   @Test
   public void testStartWithDefaultPortInUseFails() throws Throwable {
     String expectedString = "java.net.BindException";
@@ -990,7 +992,8 @@ public class ServerLauncherRemoteJUnitTest extends AbstractServerLauncherJUnitTe
     }
   } // testStartWithExistingPidFileFails
   */
-  
+
+  @Category(FlakyTest.class) // GEODE-957: BindException
   @Test
   public void testStatusUsingPid() throws Throwable {
     final List<String> jvmArguments = getJvmArguments();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXExpiryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXExpiryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXExpiryJUnitTest.java
index e9e7cc1..e2717bf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXExpiryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXExpiryJUnitTest.java
@@ -33,7 +33,6 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 /**
  * Same tests as that of {@link TXExpiryJUnitTest} after setting
  * "distributed-transactions" property to true
- *
  */
 @Category({IntegrationTest.class, DistributedTransactionsTest.class })
 public class DistTXExpiryJUnitTest extends TXExpiryJUnitTest {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/ScheduledThreadPoolExecutorWithKeepAliveJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/ScheduledThreadPoolExecutorWithKeepAliveJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/ScheduledThreadPoolExecutorWithKeepAliveJUnitTest.java
index 5078c6c..062552f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/ScheduledThreadPoolExecutorWithKeepAliveJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/ScheduledThreadPoolExecutorWithKeepAliveJUnitTest.java
@@ -89,7 +89,7 @@ public class ScheduledThreadPoolExecutorWithKeepAliveJUnitTest {
     assertEquals(2, ex.getLargestPoolSize());
   }
 
-  @Category(FlakyTest.class) // GEODE-1138: time sensitive
+  @Category(FlakyTest.class) // GEODE-1138: time sensitive with sleeps
   @Test
   public void testConcurrentExecutionAndExpiration() throws InterruptedException, ExecutionException {
     ex = new ScheduledThreadPoolExecutorWithKeepAlive(

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
index 358e7ad..eb5ddf7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
@@ -24,6 +24,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
@@ -55,6 +57,7 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class FixedPRSinglehopDUnitTest extends CacheTestCase {
 
@@ -194,6 +197,7 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase {
   // Put data, get data and make the metadata stable.
   // Now verify that metadata has all 8 buckets info.
   // Now update and ensure the fetch service is never called.
+  @Category(FlakyTest.class) // GEODE-1176
   public void test_MetadataContents() {
     
     final Host host = Host.getHost(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java
index fa1d2ba..be7cff3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java
@@ -66,6 +66,7 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 import java.io.ByteArrayInputStream;
 import java.io.DataInputStream;
@@ -73,6 +74,8 @@ import java.io.IOException;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
+import org.junit.experimental.categories.Category;
+
 
 /**
  *
@@ -1539,6 +1542,7 @@ public class GIIDeltaDUnitTest extends CacheTestCase {
    * R off line, then run P7. Restart R. It will trigger deltaGII to chunk entry P7(key1).
    * After that, do clear(). Make sure R should not contain key1 after GII.     
    */
+  @Category(FlakyTest.class) // GEODE-1068: time sensitive
   public void testClearAfterChunkEntries() throws Throwable {
     prepareForEachTest();
     final DiskStoreID memberP = getMemberID(P);
@@ -1894,6 +1898,7 @@ public class GIIDeltaDUnitTest extends CacheTestCase {
    * at the end. 
    * @throws Throwable
    */
+  @Category(FlakyTest.class) // GEODE-1137: orphaned AsyncInvocations, time sensitive
   public void testTombstoneGCDuringFullGII() throws Throwable {
     prepareForEachTest();
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java
index 71a95c5..b2c852a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java
@@ -18,6 +18,8 @@ package com.gemstone.gemfire.internal.cache;
 
 import java.util.Properties;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.DataPolicy;
 import com.gemstone.gemfire.cache.EvictionAction;
@@ -42,15 +44,10 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
-/**
- *
- */
 public class NetSearchMessagingDUnitTest extends CacheTestCase {
 
-  /**
-   * @param name
-   */
   public NetSearchMessagingDUnitTest(String name) {
     super(name);
   }
@@ -111,7 +108,8 @@ public class NetSearchMessagingDUnitTest extends CacheTestCase {
     }
     
   }
-  
+
+  @Category(FlakyTest.class) // GEODE-1155
   public void testNetSearchNormals() {
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCreationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCreationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCreationDUnitTest.java
index f97bf78..d36b4f6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCreationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCreationDUnitTest.java
@@ -23,6 +23,8 @@ package com.gemstone.gemfire.internal.cache;
 
 import java.util.Properties;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheException;
@@ -42,6 +44,7 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.ThreadUtils;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 @SuppressWarnings("serial")
 public class PartitionedRegionCreationDUnitTest extends
@@ -419,6 +422,7 @@ public class PartitionedRegionCreationDUnitTest extends
    * 
    * @throws Exception
    */
+  @Category(FlakyTest.class) // GEODE-1104: Time Sensitive
   public void testPartitionRegionInitialization() throws Throwable
   {
     final String name = getUniqueName();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDelayedRecoveryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDelayedRecoveryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDelayedRecoveryDUnitTest.java
index c794330..b79d907 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDelayedRecoveryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDelayedRecoveryDUnitTest.java
@@ -18,6 +18,9 @@ package com.gemstone.gemfire.internal.cache;
 
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
+
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.PartitionAttributes;
@@ -32,10 +35,8 @@ import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
-/**
- *
- */
 @SuppressWarnings("synthetic-access")
 public class PartitionedRegionDelayedRecoveryDUnitTest extends CacheTestCase {
   
@@ -125,6 +126,7 @@ public class PartitionedRegionDelayedRecoveryDUnitTest extends CacheTestCase {
     vm2.invoke(checkNoBucket);
   }
 
+  @Category(FlakyTest.class) // GEODE-860: time sensitive
   public void testDelay() {
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
index 636075c..4d633c6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
@@ -31,6 +31,7 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.DataSerializable;
 import com.gemstone.gemfire.DataSerializer;
@@ -75,6 +76,7 @@ import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
 
@@ -679,6 +681,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
     assertFalse(cms.isRefreshMetadataTestOnly());
   }
 
+  @Category(FlakyTest.class) // GEODE-853: random ports, pause sleeps, time sensitive
   public void testServerLocationRemovalThroughPing() {
     Integer port0 = (Integer)member0.invoke(() -> PartitionedRegionSingleHopDUnitTest.createServer( 3, 4 ));
     Integer port1 = (Integer)member1.invoke(() -> PartitionedRegionSingleHopDUnitTest.createServer( 3, 4 ));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
index 169ad3a..2040196 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionTimeOutDUnitTest.java
@@ -25,6 +25,8 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.RegionAttributes;
 import com.gemstone.gemfire.cache.execute.Execution;
@@ -44,6 +46,7 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class PRFunctionExecutionTimeOutDUnitTest extends
     PartitionedRegionDUnitTestCase {
@@ -666,6 +669,7 @@ public class PRFunctionExecutionTimeOutDUnitTest extends
    * Then test it using timeout and multiple getResult.
    * @throws Exception
    */
+  @Category(FlakyTest.class) // GEODE-1020
   public void testLocalMultiKeyExecution_byName() throws Exception {
     IgnoredException.addIgnoredException("BucketMovedException");
     final String rName = getUniqueName();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
index 4245bb6..02728db 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentColocatedPartitionedRegionDUnitTest.java
@@ -22,6 +22,8 @@ import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.admin.internal.AdminDistributedSystemImpl;
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
@@ -52,12 +54,12 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  *
  */
-public class PersistentColocatedPartitionedRegionDUnitTest extends
-    PersistentPartitionedRegionTestBase {
+public class PersistentColocatedPartitionedRegionDUnitTest extends PersistentPartitionedRegionTestBase {
 
   private static final int NUM_BUCKETS = 15;
   private static final int MAX_WAIT = 30 * 1000;
@@ -1409,6 +1411,7 @@ public class PersistentColocatedPartitionedRegionDUnitTest extends
    * a PR with persistent data.
    * @throws Throwable
    */
+  @Category(FlakyTest.class) // GEODE-900
   public void testModifyColocation() throws Throwable {
     //Create PRs where region3 is colocated with region1.
     createColocatedPRs("region1");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
index ad10e07..65f1314 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
@@ -1630,7 +1630,8 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
    * 4. Member B destroys the bucket and throws a partition offline exception, because it wasn't able to complete initialization.
    * 5. Member A recovers, and gets stuck waiting for member B.
    * @throws Throwable 
-  */
+   */
+  @Category(FlakyTest.class) // GEODE-1208
   public void testBug42226() throws Exception {
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
index 67dfbee..63d3099 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
@@ -21,6 +21,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Properties;
 
+import org.junit.experimental.categories.Category;
 import util.TestException;
 
 import com.gemstone.gemfire.cache.AttributesFactory;
@@ -53,15 +54,12 @@ import com.gemstone.gemfire.cache.client.internal.PoolImpl;
 import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
 import com.gemstone.gemfire.cache.client.internal.Connection;
 import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * Tests propagation of destroy entry operation across the vms
- *
- *
  */
-
-public class DestroyEntryPropagationDUnitTest extends DistributedTestCase
-{
+public class DestroyEntryPropagationDUnitTest extends DistributedTestCase {
 
   VM vm0 = null;
 
@@ -177,8 +175,8 @@ public class DestroyEntryPropagationDUnitTest extends DistributedTestCase
    * are situation of Interest List fail over
    *
    */
-  public void testVerifyDestroyNotReceivedBySender()
-  {
+  @Category(FlakyTest.class) // GEODE-897: time sensitive
+  public void testVerifyDestroyNotReceivedBySender() {
     final int maxWaitTime = Integer.getInteger(WAIT_PROPERTY, WAIT_DEFAULT).intValue();
     //First create entries on both servers via the two client
     vm2.invoke(() -> DestroyEntryPropagationDUnitTest.createEntriesK1andK2());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
index d92d6e9..d2e47ea 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
@@ -20,6 +20,8 @@ import java.util.Collection;
 import java.util.Iterator;
 import java.util.Properties;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
@@ -47,6 +49,7 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * Test to verify Startup. and failover during startup.
@@ -204,6 +207,7 @@ public class HAStartupAndFailoverDUnitTest extends DistributedTestCase
     /**
      * verify that Primary Should Be Null And EPList Should Be Empty When All Servers Are Dead
      */
+    @Category(FlakyTest.class) // GEODE-1045
     public void testPrimaryShouldBeNullAndEPListShouldBeEmptyWhenAllServersAreDead() throws Exception
     {
       createClientCache(this.getName(), NetworkUtils.getServerHostName(server1.getHost()));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
index 55686f3..cf0e5b1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
@@ -701,6 +701,7 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
   /**
    * Tests notification of events for loner bridge clients in server process.
    */
+  @Category(FlakyTest.class) // GEODE-1174
   public void testSystemClientEventsInServer() throws Exception {
      try {
        doTestSystemClientEventsInServer();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
index 58651e3..257771f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
@@ -355,7 +355,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
     };
   }
 
-  @Category(FlakyTest.class) // GEODE-973: getRandomAvailablePort
+  @Category(FlakyTest.class) // GEODE-973: getRandomAvailablePort, BindException
   @Test
   public void testCreateRegion46391() throws IOException {
     createDefaultSetup(null); // GEODE-973: getRandomAvailablePort

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
index f495944..2bcc15f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
@@ -46,6 +46,7 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 @Category(DistributedTest.class)
 public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
@@ -286,6 +287,7 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
    * Asserts that a describe region command issued on a region with compression returns the correct non default region
    * attribute for compression and the correct codec value.
    */
+  @Category(FlakyTest.class) // GEODE-1033
   @Test
   public void testDescribeRegionWithCompressionCodec() {
     final String regionName = "compressedRegion";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
index f5aa506..777bb70 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
@@ -38,6 +38,7 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
 import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
 import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 @Category(DistributedTest.class)
 public class ShellCommandsDUnitTest extends CliCommandTestBase {
@@ -54,6 +55,7 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
         "localhost[" + locatorPort + "]").toString());
   }
 
+  @Category(FlakyTest.class) // GEODE-989: random ports BindException
   @Test
   public void testConnectToLocatorBecomesManager() {
     final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/memcached/GemcachedDevelopmentJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/memcached/GemcachedDevelopmentJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/memcached/GemcachedDevelopmentJUnitTest.java
index 080404f..fd6fefa 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/memcached/GemcachedDevelopmentJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/memcached/GemcachedDevelopmentJUnitTest.java
@@ -43,6 +43,7 @@ import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer.Protocol;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 @Category(IntegrationTest.class)
@@ -156,6 +157,7 @@ public class GemcachedDevelopmentJUnitTest {
     assertNull(client.get("key1"));
   }
 
+  @Category(FlakyTest.class) // GEODE-1140: time sensitive with sleep
   @Test
   public void testExpiration() throws Exception {
     MemcachedClient client = bootstrapClient();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
index 825f532..345a51c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
@@ -18,6 +18,7 @@ package com.gemstone.gemfire.redis;
 
 import java.util.Random;
 
+import org.junit.experimental.categories.Category;
 import redis.clients.jedis.Jedis;
 
 import com.gemstone.gemfire.cache.CacheFactory;
@@ -31,6 +32,7 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 public class RedisDistDUnitTest extends DistributedTestCase {
 
@@ -105,6 +107,7 @@ public class RedisDistDUnitTest extends DistributedTestCase {
     disconnectAllFromDS();
   }
 
+  @Category(FlakyTest.class) // GEODE-1092
   public void testConcListOps() throws Throwable {
     final Jedis jedis1 = new Jedis(localHost, server1Port, JEDIS_TIMEOUT);
     final Jedis jedis2 = new Jedis(localHost, server2Port, JEDIS_TIMEOUT);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
index 83bf532..aba4427 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
@@ -23,6 +23,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 
 /**
@@ -75,6 +76,7 @@ public class ClientAuthenticationDUnitTest extends ClientAuthenticationTestCase
     doTestCredentialsWithFailover(false);
   }
 
+  @Category(FlakyTest.class) // GEODE-838: random ports, pause sleep, time sensitive
   @Test
   public void testCredentialsForNotifications() throws Exception {
     doTestCredentialsForNotifications(false);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
index 179f29d..5531c6a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
@@ -48,6 +48,7 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
 import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 import com.gemstone.gemfire.test.junit.categories.SecurityTest;
 
 /**
@@ -176,6 +177,7 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
   /**
    * Authenticator is incorrect
    */
+  @Category(FlakyTest.class) // GEODE-1089: getRandomAvailablePort
   @Test
   public void testP2PAuthenticationWithInvalidAuthenticator() throws Exception {
     int locatorPort = getRandomAvailablePort(SOCKET);
@@ -204,6 +206,7 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
     }
   }
 
+  @Category(FlakyTest.class) // GEODE-1091: getRandomAvailablePort
   @Test
   public void testP2PAuthenticationWithNoCredentials() throws Exception {
     int locatorPort = getRandomAvailablePort(SOCKET);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfDUnitTest.java
index 724766b..b91e710 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfDUnitTest.java
@@ -21,6 +21,8 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.query.CqAttributes;
 import com.gemstone.gemfire.cache.query.CqAttributesFactory;
@@ -43,6 +45,7 @@ import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * This class tests the ContiunousQuery mechanism in GemFire.
@@ -399,6 +402,7 @@ public class CqPerfDUnitTest extends CacheTestCase {
    * To test the changes relating to, executing CQ only once for all similar CQs.
    * @throws Exception
    */
+  @Category(FlakyTest.class) // GEODE-1164
   public void testMatchingCqs() throws Exception {
     
     final Host host = Host.getHost(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfUsingPoolDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfUsingPoolDUnitTest.java
index 073e82e..9faec8a 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqPerfUsingPoolDUnitTest.java
@@ -21,6 +21,8 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.query.CqAttributes;
 import com.gemstone.gemfire.cache.query.CqAttributesFactory;
@@ -43,15 +45,15 @@ import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
 
 /**
  * This class tests the ContiunousQuery mechanism in GemFire.
  * This includes the test with diffetent data activities.
- *
  */
 public class CqPerfUsingPoolDUnitTest extends CacheTestCase {
 
-  protected CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("CqPerfUsingPoolDUnitTest");
+  protected CqQueryUsingPoolDUnitTest cqDUnitTest = new CqQueryUsingPoolDUnitTest("CqPerfUsingPoolDUnitTest"); // TODO: get rid of this!
   
   public CqPerfUsingPoolDUnitTest(String name) {
     super(name);
@@ -399,6 +401,7 @@ public class CqPerfUsingPoolDUnitTest extends CacheTestCase {
    * To test the changes relating to, executing CQ only once for all similar CQs.
    * @throws Exception
    */
+  @Category(FlakyTest.class) // GEODE-988
   public void testMatchingCqs() throws Exception {
     
     final Host host = Host.getHost(0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f30486/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolDUnitTest.java
index 8d4477f..be4b970 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PrCqUsingPoolDUnitTest.java
@@ -21,6 +21,8 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 
+import org.junit.experimental.categories.Category;
+
 import com.gemstone.gemfire.cache.AttributesFactory;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheException;
@@ -49,6 +51,8 @@ import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+
 /**
  * Test class for Partitioned Region and CQs
  * 
@@ -1189,6 +1193,7 @@ public class PrCqUsingPoolDUnitTest extends CacheTestCase {
    * thus making the query data and region data inconsistent.
    * @throws Exception
    */
+  @Category(FlakyTest.class) // GEODE-1181
   public void testEventsDuringQueryExecution() throws Exception {
     final Host host = Host.getHost(0);
     VM server1 = host.getVM(0);