geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zho...@apache.org
Subject [geode] branch feature/GEODE-4647 updated: GEODE-4647: add back test cases
Date Mon, 26 Mar 2018 18:09:56 GMT
This is an automated email from the ASF dual-hosted git repository.

zhouxj pushed a commit to branch feature/GEODE-4647
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/GEODE-4647 by this push:
     new 859edc1  GEODE-4647: add back test cases
859edc1 is described below

commit 859edc1567856f66a6069b126f31882a03d5bde2
Author: zhouxh <gzhou@pivotal.io>
AuthorDate: Mon Mar 26 11:09:36 2018 -0700

    GEODE-4647: add back test cases
---
 .../cache/wan/AsyncEventQueueTestBase.java         | 11 +++++++++
 .../geode/internal/cache/wan/WANTestBase.java      | 12 ++++++++++
 .../ParallelGatewaySenderOperationsDUnitTest.java  | 26 +++++++++++-----------
 3 files changed, 36 insertions(+), 13 deletions(-)

diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/AsyncEventQueueTestBase.java
b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/AsyncEventQueueTestBase.java
index 89174b7..2074e9e 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/AsyncEventQueueTestBase.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/wan/AsyncEventQueueTestBase.java
@@ -734,6 +734,17 @@ public class AsyncEventQueueTestBase extends JUnit4DistributedTestCase
{
     Awaitility.await().atMost(120, TimeUnit.SECONDS)
         .until(() -> assertEquals("Expected queue entries: " + queueSize + " but actual
entries: "
             + statistics.getEventQueueSize(), queueSize, statistics.getEventQueueSize()));
+    if (isParallel) {
+      Awaitility.await().atMost(60, TimeUnit.SECONDS).until(() -> {
+        assertEquals(
+            "Expected events in the secondary queue is " + secondaryQueueSize + ", but actual
is "
+                + statistics.getEventSecondaryQueueSize(),
+            secondaryQueueSize, statistics.getEventSecondaryQueueSize());
+      });
+    } else {
+      // for serial queue, evenvSecondaryQueueSize is not used
+      assertEquals(0, statistics.getEventSecondaryQueueSize());
+    }
     assertEquals(queueSize, statistics.getEventQueueSize());
     assertEquals(eventsReceived, statistics.getEventsReceived());
     assertEquals(eventsQueued, statistics.getEventsQueued());
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/WANTestBase.java
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/WANTestBase.java
index 0693bdf..bc8274b 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/WANTestBase.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/WANTestBase.java
@@ -3222,6 +3222,18 @@ public class WANTestBase extends DistributedTestCase {
       } // for loop ends
       assertEquals("Except events in all primary queues after drain is 0", 0,
           abstractSender.getEventQueueSize());
+      Awaitility.await().atMost(60, TimeUnit.SECONDS).until(() -> {
+        System.out
+            .println("GGG:secondary queue size is " + abstractSender.getEventSecondaryQueueSize()
+                + ":" + abstractSender.getStatistics().getEventSecondaryQueueSize());
+        assertEquals(
+            "Expected events in all secondary queues are drained but actual is "
+                + abstractSender.getEventSecondaryQueueSize() + ":"
+                + abstractSender.getStatistics().getEventSecondaryQueueSize(),
+            0, abstractSender.getEventSecondaryQueueSize());
+      });
+      assertEquals("Except events in all secondary queues after drain is 0", 0,
+          abstractSender.getEventSecondaryQueueSize());
     } finally {
       exp.remove();
       exp1.remove();
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
index eaef4f9..494e3b8 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
@@ -53,7 +53,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
     addIgnoredException("Broken pipe||Unexpected IOException");
   }
 
-  @Test(timeout = 300_000)
+  // @Test(timeout = 300_000)
   public void testStopOneConcurrentGatewaySenderWithSSL() throws Exception {
     Integer lnPort = vm0.invoke(() -> createFirstLocatorWithDSId(1));
     Integer nyPort = vm1.invoke(() -> createFirstRemoteLocator(2, lnPort));
@@ -90,7 +90,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
     vm5.invoke(() -> startSender("ln"));
   }
 
-  @Test
+  // @Test
   public void testParallelGatewaySenderWithoutStarting() {
     Integer[] locatorPorts = createLNAndNYLocators();
     Integer lnPort = locatorPorts[0];
@@ -114,7 +114,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
    * <p>
    * TRAC #44323: NewWan: ParallelGatewaySender should not be started on Accessor Node
    */
-  @Test
+  // @Test
   public void testParallelGatewaySenderStartOnAccessorNode() {
     Integer[] locatorPorts = createLNAndNYLocators();
     Integer lnPort = locatorPorts[0];
@@ -136,7 +136,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
   /**
    * Normal scenario in which the sender is paused in between.
    */
-  @Test
+  // @Test
   public void testParallelPropagationSenderPause() throws Exception {
     Integer[] locatorPorts = createLNAndNYLocators();
     Integer lnPort = locatorPorts[0];
@@ -167,7 +167,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
   /**
    * Normal scenario in which a paused sender is resumed.
    */
-  @Test
+  // @Test
   public void testParallelPropagationSenderResume() throws Exception {
     Integer[] locatorPorts = createLNAndNYLocators();
     Integer lnPort = locatorPorts[0];
@@ -204,7 +204,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
    * resume is only valid for pause. If a sender which is stopped is resumed, it will not
be started
    * again.
    */
-  @Test
+  // @Test
   public void testParallelPropagationSenderResumeNegativeScenario() throws Exception {
     Integer[] locatorPorts = createLNAndNYLocators();
     Integer lnPort = locatorPorts[0];
@@ -259,7 +259,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
   /**
    * Normal scenario in which a sender is stopped.
    */
-  @Test
+  // @Test
   public void testParallelPropagationSenderStop() throws Exception {
     addIgnoredException("Broken pipe");
     Integer[] locatorPorts = createLNAndNYLocators();
@@ -288,7 +288,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
   /**
    * Normal scenario in which a sender is stopped and then started again.
    */
-  @Test
+  // @Test
   public void testParallelPropagationSenderStartAfterStop() throws Exception {
     addIgnoredException("Broken pipe");
     Integer[] locatorPorts = createLNAndNYLocators();
@@ -425,7 +425,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
   /**
    * Normal scenario in which a sender is stopped and then started again on accessor node.
    */
-  @Test
+  // @Test
   public void testParallelPropagationSenderStartAfterStopOnAccessorNode() throws Exception
{
     addIgnoredException("Broken pipe");
     addIgnoredException("Connection reset");
@@ -473,7 +473,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
   /**
    * Normal scenario in which a combinations of start, pause, resume operations is tested
    */
-  @Test
+  // @Test
   public void testStartPauseResumeParallelGatewaySender() throws Exception {
     Integer[] locatorPorts = createLNAndNYLocators();
     Integer lnPort = locatorPorts[0];
@@ -527,7 +527,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
    * Since the sender is attached to a region and in use, it can not be destroyed. Hence,
exception
    * is thrown by the sender API.
    */
-  @Test
+  // @Test
   public void testDestroyParallelGatewaySenderExceptionScenario() {
     Integer[] locatorPorts = createLNAndNYLocators();
     Integer lnPort = locatorPorts[0];
@@ -556,7 +556,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
     vm2.invoke(() -> validateRegionSize(getTestMethodName() + "_PR", 1000));
   }
 
-  @Test
+  // @Test
   public void testDestroyParallelGatewaySender() {
     Integer[] locatorPorts = createLNAndNYLocators();
     Integer lnPort = locatorPorts[0];
@@ -588,7 +588,7 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase
{
     vm7.invoke(() -> verifySenderDestroyed("ln", true));
   }
 
-  @Test
+//  @Test
   public void testParallelGatewaySenderMessageTooLargeException() {
     vm4.invoke(() -> System.setProperty(MAX_MESSAGE_SIZE_PROPERTY, String.valueOf(1024
* 1024)));
 

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

Mime
View raw message