This is an automated email from the ASF dual-hosted git repository.

nnag pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new b8d16ee  GEODE-4829: Categorized AEQ tests (#1605)
b8d16ee is described below

commit b8d16ee43dfcbb94fff453f4421bddc20d0ec12d
Author: Nabarun Nag <nabarun...@users.noreply.github.com>
AuthorDate: Tue Mar 13 17:18:47 2018 -0700

    GEODE-4829: Categorized AEQ tests (#1605)
---
 ...ncEventQueueEvictionAndExpirationJUnitTest.java | 13 ++++++++--
 .../SerialAsyncEventQueueImplJUnitTest.java        |  4 ++--
 ...yncEventQueueEntrySynchronizationDUnitTest.java |  3 ++-
 .../asyncqueue/AsyncEventListenerDUnitTest.java    |  3 ++-
 .../AsyncEventListenerOffHeapDUnitTest.java        |  8 ++-----
 .../asyncqueue/AsyncEventQueueStatsDUnitTest.java  |  7 +++---
 .../AsyncEventQueueValidationsJUnitTest.java       | 11 +++++----
 .../ConcurrentAsyncEventQueueDUnitTest.java        |  7 +++---
 .../ConcurrentAsyncEventQueueOffHeapDUnitTest.java |  8 ++-----
 .../CommonParallelAsyncEventQueueDUnitTest.java    |  7 +++---
 ...monParallelAsyncEventQueueOffHeapDUnitTest.java |  8 ++-----
 ...elGatewaySenderFlushedCoordinatorJUnitTest.java |  8 +++----
 .../geode/test/junit/categories/AEQTest.java       | 28 ++++------------------
 gradle/test.gradle                                 | 12 ++++++++++
 14 files changed, 60 insertions(+), 67 deletions(-)

diff --git 
a/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/AsyncEventQueueEvictionAndExpirationJUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/AsyncEventQueueEvictionAndExpirationJUnitTest.java
index a2b6918..ef9fde1 100644
--- 
a/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/AsyncEventQueueEvictionAndExpirationJUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/AsyncEventQueueEvictionAndExpirationJUnitTest.java
@@ -32,15 +32,24 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.rules.TestName;
 
-import org.apache.geode.cache.*;
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.CacheFactory;
+import org.apache.geode.cache.EvictionAction;
+import org.apache.geode.cache.EvictionAttributes;
+import org.apache.geode.cache.ExpirationAction;
+import org.apache.geode.cache.ExpirationAttributes;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionFactory;
+import org.apache.geode.cache.RegionShortcut;
 import org.apache.geode.cache.asyncqueue.internal.AsyncEventQueueImpl;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.PartitionedRegion;
 import org.apache.geode.internal.cache.wan.AbstractGatewaySender;
+import org.apache.geode.test.junit.categories.AEQTest;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 
-@Category(IntegrationTest.class)
+@Category({IntegrationTest.class, AEQTest.class})
 public class AsyncEventQueueEvictionAndExpirationJUnitTest {
 
   private AsyncEventQueue aeq;
diff --git 
a/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java
index cdef8bd..eb8ad01 100644
--- 
a/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java
@@ -22,13 +22,13 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.wan.GatewaySenderAttributes;
+import org.apache.geode.test.junit.categories.AEQTest;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 
-@Category(IntegrationTest.class)
+@Category({IntegrationTest.class, AEQTest.class})
 public class SerialAsyncEventQueueImplJUnitTest {
 
   private InternalCache cache;
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/AsyncEventQueueEntrySynchronizationDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/AsyncEventQueueEntrySynchronizationDUnitTest.java
index ae14c5f..8c7c56a 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/AsyncEventQueueEntrySynchronizationDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/AsyncEventQueueEntrySynchronizationDUnitTest.java
@@ -39,9 +39,10 @@ import org.apache.geode.internal.cache.versions.VMVersionTag;
 import org.apache.geode.internal.cache.versions.VersionSource;
 import org.apache.geode.internal.cache.versions.VersionTag;
 import org.apache.geode.test.dunit.DistributedTestUtils;
+import org.apache.geode.test.junit.categories.AEQTest;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
-@Category(DistributedTest.class)
+@Category({DistributedTest.class, AEQTest.class})
 @RunWith(JUnitParamsRunner.class)
 public class AsyncEventQueueEntrySynchronizationDUnitTest extends 
AsyncEventQueueTestBase {
 
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
index 3e51778..465f35a 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
@@ -68,9 +68,10 @@ import org.apache.geode.test.dunit.LogWriterUtils;
 import org.apache.geode.test.dunit.SerializableRunnableIF;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.Wait;
+import org.apache.geode.test.junit.categories.AEQTest;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
-@Category(DistributedTest.class)
+@Category({DistributedTest.class, AEQTest.class})
 public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
 
   public AsyncEventListenerDUnitTest() {
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerOffHeapDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerOffHeapDUnitTest.java
index b774ab3..e120d18 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerOffHeapDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerOffHeapDUnitTest.java
@@ -14,17 +14,13 @@
  */
 package org.apache.geode.internal.cache.wan.asyncqueue;
 
-import static org.junit.Assert.*;
-
-import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
-import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
+import org.apache.geode.test.junit.categories.AEQTest;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
 @SuppressWarnings("serial")
-@Category(DistributedTest.class)
+@Category({DistributedTest.class, AEQTest.class})
 public class AsyncEventListenerOffHeapDUnitTest extends 
AsyncEventListenerDUnitTest {
 
   public AsyncEventListenerOffHeapDUnitTest() {
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueStatsDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueStatsDUnitTest.java
index b131b46..935a650 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueStatsDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueStatsDUnitTest.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.wan.asyncqueue;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.fail;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -25,11 +25,10 @@ import org.junit.experimental.categories.Category;
 import org.apache.geode.internal.cache.wan.AsyncEventQueueTestBase;
 import org.apache.geode.test.dunit.AsyncInvocation;
 import org.apache.geode.test.dunit.Wait;
-import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
-import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
+import org.apache.geode.test.junit.categories.AEQTest;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
-@Category(DistributedTest.class)
+@Category({DistributedTest.class, AEQTest.class})
 public class AsyncEventQueueStatsDUnitTest extends AsyncEventQueueTestBase {
 
   private static final long serialVersionUID = 1L;
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
index b6524a7..67dbc6f 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
@@ -17,9 +17,11 @@
  */
 package org.apache.geode.internal.cache.wan.asyncqueue;
 
-import static junitparams.JUnitParamsRunner.*;
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-import static org.junit.Assert.*;
+import static junitparams.JUnitParamsRunner.$;
+import static 
org.apache.geode.distributed.ConfigurationProperties.CACHE_XML_FILE;
+import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.util.List;
 import java.util.concurrent.TimeUnit;
@@ -41,10 +43,11 @@ import org.apache.geode.cache.wan.GatewayEventFilter;
 import org.apache.geode.cache.wan.GatewaySender.OrderPolicy;
 import 
org.apache.geode.internal.cache.wan.AsyncEventQueueConfigurationException;
 import org.apache.geode.internal.cache.wan.MyGatewayEventFilter;
+import org.apache.geode.test.junit.categories.AEQTest;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.util.test.TestUtil;
 
-@Category(IntegrationTest.class)
+@Category({IntegrationTest.class, AEQTest.class})
 @RunWith(JUnitParamsRunner.class)
 public class AsyncEventQueueValidationsJUnitTest {
 
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentAsyncEventQueueDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentAsyncEventQueueDUnitTest.java
index 4dda995..8803827 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentAsyncEventQueueDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentAsyncEventQueueDUnitTest.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.wan.concurrent;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -24,14 +24,13 @@ import org.apache.geode.cache.wan.GatewaySender.OrderPolicy;
 import org.apache.geode.internal.cache.wan.AsyncEventQueueTestBase;
 import org.apache.geode.test.dunit.Assert;
 import org.apache.geode.test.dunit.AsyncInvocation;
-import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
-import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
+import org.apache.geode.test.junit.categories.AEQTest;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
 /**
  *
  */
-@Category(DistributedTest.class)
+@Category({DistributedTest.class, AEQTest.class})
 public class ConcurrentAsyncEventQueueDUnitTest extends 
AsyncEventQueueTestBase {
 
   private static final long serialVersionUID = 1L;
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentAsyncEventQueueOffHeapDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentAsyncEventQueueOffHeapDUnitTest.java
index d3ad505..67627be 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentAsyncEventQueueOffHeapDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentAsyncEventQueueOffHeapDUnitTest.java
@@ -14,17 +14,13 @@
  */
 package org.apache.geode.internal.cache.wan.concurrent;
 
-import static org.junit.Assert.*;
-
-import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
-import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
+import org.apache.geode.test.junit.categories.AEQTest;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
 @SuppressWarnings("serial")
-@Category(DistributedTest.class)
+@Category({DistributedTest.class, AEQTest.class})
 public class ConcurrentAsyncEventQueueOffHeapDUnitTest extends 
ConcurrentAsyncEventQueueDUnitTest {
 
   public ConcurrentAsyncEventQueueOffHeapDUnitTest() {
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/misc/CommonParallelAsyncEventQueueDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/misc/CommonParallelAsyncEventQueueDUnitTest.java
index cb707a8..399fd35 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/misc/CommonParallelAsyncEventQueueDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/misc/CommonParallelAsyncEventQueueDUnitTest.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.cache.wan.misc;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.fail;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -22,14 +22,13 @@ import org.junit.experimental.categories.Category;
 import org.apache.geode.internal.cache.wan.AsyncEventQueueTestBase;
 import org.apache.geode.test.dunit.Assert;
 import org.apache.geode.test.dunit.IgnoredException;
-import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
-import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
+import org.apache.geode.test.junit.categories.AEQTest;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
 /**
  *
  */
-@Category(DistributedTest.class)
+@Category({DistributedTest.class, AEQTest.class})
 public class CommonParallelAsyncEventQueueDUnitTest extends 
AsyncEventQueueTestBase {
 
   private static final long serialVersionUID = 1L;
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/misc/CommonParallelAsyncEventQueueOffHeapDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/misc/CommonParallelAsyncEventQueueOffHeapDUnitTest.java
index b0e4eb6..daed8ac 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/misc/CommonParallelAsyncEventQueueOffHeapDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/misc/CommonParallelAsyncEventQueueOffHeapDUnitTest.java
@@ -14,17 +14,13 @@
  */
 package org.apache.geode.internal.cache.wan.misc;
 
-import static org.junit.Assert.*;
-
-import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
-import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
+import org.apache.geode.test.junit.categories.AEQTest;
 import org.apache.geode.test.junit.categories.DistributedTest;
 
 @SuppressWarnings("serial")
-@Category(DistributedTest.class)
+@Category({DistributedTest.class, AEQTest.class})
 public class CommonParallelAsyncEventQueueOffHeapDUnitTest
     extends CommonParallelAsyncEventQueueDUnitTest {
 
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/WaitUntilParallelGatewaySenderFlushedCoordinatorJUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/WaitUntilParallelGatewaySenderFlushedCoordinatorJUnitTest.java
index 4b46e54..2fe3923 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/WaitUntilParallelGatewaySenderFlushedCoordinatorJUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/WaitUntilParallelGatewaySenderFlushedCoordinatorJUnitTest.java
@@ -16,21 +16,21 @@ package org.apache.geode.internal.cache.wan.parallel;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.*;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyLong;
+import static org.mockito.Mockito.atMost;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-import java.util.ArrayList;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
-import org.mockito.Mockito;
 
 import org.apache.geode.internal.cache.BucketRegion;
 import org.apache.geode.internal.cache.BucketRegionQueue;
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerOffHeapDUnitTest.java
 b/geode-junit/src/main/java/org/apache/geode/test/junit/categories/AEQTest.java
similarity index 54%
copy from 
geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerOffHeapDUnitTest.java
copy to 
geode-junit/src/main/java/org/apache/geode/test/junit/categories/AEQTest.java
index b774ab3..d6308cc 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/asyncqueue/AsyncEventListenerOffHeapDUnitTest.java
+++ 
b/geode-junit/src/main/java/org/apache/geode/test/junit/categories/AEQTest.java
@@ -12,28 +12,10 @@
  * or implied. See the License for the specific language governing permissions 
and limitations under
  * the License.
  */
-package org.apache.geode.internal.cache.wan.asyncqueue;
-
-import static org.junit.Assert.*;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase;
-import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
-import org.apache.geode.test.junit.categories.DistributedTest;
-
-@SuppressWarnings("serial")
-@Category(DistributedTest.class)
-public class AsyncEventListenerOffHeapDUnitTest extends 
AsyncEventListenerDUnitTest {
-
-  public AsyncEventListenerOffHeapDUnitTest() {
-    super();
-  }
-
-  @Override
-  public boolean isOffHeap() {
-    return true;
-  }
+package org.apache.geode.test.junit.categories;
 
+/**
+ * JUnit Test Category that specifies a test that involves AEQ feature.
+ */
+public interface AEQTest {
 }
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 5121f34..cf7d8a5 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -254,6 +254,18 @@ subprojects {
     reports.junitXml.destination = file "$buildDir/test-reports-lucene"
   }
 
+  task aeqTest(type:Test) {
+    useJUnit {
+      includeCategories 'org.apache.geode.test.junit.categories.AEQTest'
+      excludeCategories 'org.apache.geode.test.junit.categories.FlakyTest'
+    }
+    doFirst {
+      TestPropertiesWriter.writeTestProperties(buildDir, name)
+    }
+    reports.junitXml.destination = file "$buildDir/test-reports-aeq"
+  }
+
+
   task wanTest(type:Test) {
     useJUnit {
       includeCategories 'org.apache.geode.test.junit.categories.WanTest'

-- 
To stop receiving notification emails like this one, please contact
n...@apache.org.

Reply via email to