geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [15/50] [abbrv] incubator-geode git commit: GEODE-873: Allowing for possible retry in testParallelPregationHA
Date Mon, 01 Feb 2016 20:55:32 GMT
GEODE-873: Allowing for possible retry in testParallelPregationHA

It's possible a put could be retried due to the member shutdown in this
test. If there is a retry, the stats may get incremented by one more
event.


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

Branch: refs/heads/feature/GEODE-773-2
Commit: 441c29cdb1df3a29b75dee6d1b99b6506cb80cde
Parents: 2260630
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Wed Jan 27 17:25:30 2016 -0800
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Thu Jan 28 09:38:00 2016 -0800

----------------------------------------------------------------------
 .../cache/wan/parallel/ParallelWANStatsDUnitTest.java       | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/441c29cd/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
index 4da0868..529e378 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
@@ -306,7 +306,7 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
     vm2.invoke(WANTestBase.class, "checkGatewayReceiverStats", new Object[] {100, 1000, 1000
});
     vm3.invoke(WANTestBase.class, "checkGatewayReceiverStats", new Object[] {100, 1000, 1000
});
   }
-
+  
   public void testParallelPropagationHA() throws Exception {
     Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
         "createFirstLocatorWithDSId", new Object[] { 1 });
@@ -365,8 +365,11 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
         WANTestBase.class, "getSenderStats", new Object[] { "ln", 0});
     
     assertEquals(0, v5List.get(0) + v6List.get(0) + v7List.get(0) ); //queue size
-    assertEquals(30000, v5List.get(1) + v6List.get(1) + v7List.get(1)); //eventsReceived
-    assertEquals(30000, v5List.get(2) + v6List.get(2) + v7List.get(2)); //events queued
+    int receivedEvents = v5List.get(1) + v6List.get(1) + v7List.get(1);
+    //We may see a single retried event on all members due to the kill
+    assertTrue("Received " + receivedEvents, 30000 <= receivedEvents && 30003
>= receivedEvents); //eventsReceived
+    int queuedEvents = v5List.get(2) + v6List.get(2) + v7List.get(2);
+    assertTrue("Queued " + queuedEvents, 30000 <= queuedEvents && 30003 >=
queuedEvents); //eventsQueued
     //assertTrue(10000 <= v5List.get(3) + v6List.get(3) + v7List.get(3)); //events distributed
: its quite possible that vm4 has distributed some of the events
     //assertTrue(v5List.get(4) + v6List.get(4) + v7List.get(4) > 1000); //batches distributed
: its quite possible that vm4 has distributed some of the batches.
     assertEquals(0, v5List.get(5) + v6List.get(5) + v7List.get(5)); //batches redistributed


Mime
View raw message