geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject incubator-geode git commit: GEODE-1384: Stat issues were fixed as a part of other tickets.
Date Tue, 04 Oct 2016 22:13:43 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 71627eb81 -> 15a5267c4


GEODE-1384: Stat issues were fixed as a part of other tickets.

	* Code refactored to have the correct order of creation of cache, region and sender receivers.


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

Branch: refs/heads/develop
Commit: 15a5267c47852efbed14cb9b85614a1208145c33
Parents: 71627eb
Author: nabarun <nnag@pivotal.io>
Authored: Tue Oct 4 15:11:30 2016 -0700
Committer: nabarun <nnag@pivotal.io>
Committed: Tue Oct 4 15:13:37 2016 -0700

----------------------------------------------------------------------
 .../wan/parallel/ParallelWANStatsDUnitTest.java | 27 ++++++++++++++------
 1 file changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/15a5267c/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
index 4a68608..9d2f1a5 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANStatsDUnitTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.geode.internal.cache.wan.parallel;
 
+import com.jayway.awaitility.Awaitility;
 import org.junit.Ignore;
 import org.junit.experimental.categories.Category;
 import org.junit.Test;
@@ -32,6 +33,7 @@ import static org.apache.geode.test.dunit.IgnoredException.*;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.TimeUnit;
 
 import org.junit.experimental.categories.Category;
 
@@ -224,31 +226,40 @@ public class ParallelWANStatsDUnitTest extends WANTestBase{
     vm3.invoke(() -> WANTestBase.checkGatewayReceiverStats(10, NUM_PUTS, NUM_PUTS ));
   }
   
-  @Category(FlakyTest.class) // GEODE-1384
   @Test
   public void testParallelPropagationHA() throws Exception {
     Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(
1 ));
     Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2,
lnPort ));
 
     createCacheInVMs(nyPort, vm2);
-    createReceiverInVMs(vm2);
 
-    createSenders(lnPort);
-    
     createReceiverPR(vm2, 0);
-    
+
+    createReceiverInVMs(vm2);
+
+    createCacheInVMs(lnPort, vm4, vm5, vm6, vm7);
+
     createSenderPRs(3);
 
+    vm4.invoke(() -> WANTestBase.createSender( "ln", 2,
+      true, 100, 10, true, false, null, true ));
+    vm5.invoke(() -> WANTestBase.createSender( "ln", 2,
+      true, 100, 10, true, false, null, true ));
+    vm6.invoke(() -> WANTestBase.createSender( "ln", 2,
+      true, 100, 10, true, false, null, true ));
+    vm7.invoke(() -> WANTestBase.createSender( "ln", 2,
+      true, 100, 10, true, false, null, true ));
+
     startSenderInVMs("ln", vm4, vm5, vm6, vm7);
 
     AsyncInvocation inv1 = vm5.invokeAsync(() -> WANTestBase.doPuts( testName, 1000 ));
-    pause(200);
+    vm2.invoke(() -> Awaitility.await().atMost(30000, TimeUnit.MILLISECONDS).until(()
->
+      assertEquals("Waiting for first batch to be received",true,getRegionSize(testName)
> 10)));
     AsyncInvocation inv2 = vm4.invokeAsync(() -> WANTestBase.killSender());
     inv1.join();
     inv2.join();
     
-    vm2.invoke(() -> WANTestBase.validateRegionSize(
-        testName, 1000 ));
+    vm2.invoke(() -> WANTestBase.validateRegionSize(testName, 1000 ));
     
     ArrayList<Integer> v5List = (ArrayList<Integer>)vm5.invoke(() -> WANTestBase.getSenderStats(
"ln", 0));
     ArrayList<Integer> v6List = (ArrayList<Integer>)vm6.invoke(() -> WANTestBase.getSenderStats(
"ln", 0));


Mime
View raw message