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

incubator-geode git commit: GEODE-1804: Refactored the test

Repository: incubator-geode
Updated Branches:
  refs/heads/develop f0dab0aa3 -> f82626f46


GEODE-1804: Refactored the test

	* Refactored the test to have the correct order of creation of cache, region and sender-receivers.
	* Additional validity check for the local region size.


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

Branch: refs/heads/develop
Commit: f82626f46babe0f5fcce8dafd5deab2ca6b86860
Parents: f0dab0a
Author: nabarun <nn...@pivotal.io>
Authored: Tue Oct 4 15:26:45 2016 -0700
Committer: nabarun <nn...@pivotal.io>
Committed: Tue Oct 4 15:26:45 2016 -0700

----------------------------------------------------------------------
 .../serial/SerialWANPropagationDUnitTest.java   | 55 +++++++++++---------
 1 file changed, 29 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f82626f4/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/serial/SerialWANPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/serial/SerialWANPropagationDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/serial/SerialWANPropagationDUnitTest.java
index 52cd25f..a3c5ee4 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/serial/SerialWANPropagationDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/serial/SerialWANPropagationDUnitTest.java
@@ -527,7 +527,6 @@ public class SerialWANPropagationDUnitTest extends WANTestBase {
         getTestMethodName() + "_RR_1", 1000 ));
   }
 
-  @Category(FlakyTest.class) // GEODE-1804
   @Test
   public void testReplicatedSerialPropagationWithRemoteRegionDestroy3()
       throws Exception {
@@ -535,51 +534,52 @@ public class SerialWANPropagationDUnitTest extends WANTestBase {
     Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
     // these are part of remote site
     createCacheInVMs(nyPort, vm2, vm3);
-    createReceiverInVMs(vm2, vm3);
-
-    // these are part of local site
-    createCacheInVMs(lnPort, vm4, vm5, vm6, vm7);
-
-    // senders are created on local site
-    vm4.invoke(() -> WANTestBase.createSender( "ln", 2,
-        false, 100, 200, false, false, null, true ));
-    vm5.invoke(() -> WANTestBase.createSender( "ln", 2,
-        false, 100, 200, false, false, null, true ));
 
     // create one RR (RR_1) on remote site
     vm2.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_1", null, isOffHeap()  ));
+      getTestMethodName() + "_RR_1", null, isOffHeap()  ));
     vm3.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_1", null, isOffHeap()  ));
+      getTestMethodName() + "_RR_1", null, isOffHeap()  ));
 
     // create another RR (RR_2) on remote site
     vm2.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_2", null, isOffHeap()  ));
+      getTestMethodName() + "_RR_2", null, isOffHeap()  ));
     vm3.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_2", null, isOffHeap()  ));
-    
-    // start the senders on local site
-    startSenderInVMs("ln", vm4, vm5);
+      getTestMethodName() + "_RR_2", null, isOffHeap()  ));
+
+    createReceiverInVMs(vm2, vm3);
+
+    // these are part of local site
+    createCacheInVMs(lnPort, vm4, vm5, vm6, vm7);
 
     // create one RR (RR_1) on local site
     vm4.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_1", "ln", isOffHeap()  ));
+      getTestMethodName() + "_RR_1", "ln", isOffHeap()  ));
     vm5.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_1", "ln", isOffHeap()  ));
+      getTestMethodName() + "_RR_1", "ln", isOffHeap()  ));
     vm6.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_1", "ln", isOffHeap()  ));
+      getTestMethodName() + "_RR_1", "ln", isOffHeap()  ));
     vm7.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_1", "ln", isOffHeap()  ));
+      getTestMethodName() + "_RR_1", "ln", isOffHeap()  ));
 
     // create another RR (RR_2) on local site
     vm4.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_2", "ln", isOffHeap()  ));
+      getTestMethodName() + "_RR_2", "ln", isOffHeap()  ));
     vm5.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_2", "ln", isOffHeap()  ));
+      getTestMethodName() + "_RR_2", "ln", isOffHeap()  ));
     vm6.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_2", "ln", isOffHeap()  ));
+      getTestMethodName() + "_RR_2", "ln", isOffHeap()  ));
     vm7.invoke(() -> WANTestBase.createReplicatedRegion(
-        getTestMethodName() + "_RR_2", "ln", isOffHeap()  ));
+      getTestMethodName() + "_RR_2", "ln", isOffHeap()  ));
+
+    // senders are created on local site
+    vm4.invoke(() -> WANTestBase.createSender( "ln", 2,
+        false, 100, 200, false, false, null, true ));
+    vm5.invoke(() -> WANTestBase.createSender( "ln", 2,
+        false, 100, 200, false, false, null, true ));
+
+    // start the senders on local site
+    startSenderInVMs("ln", vm4, vm5);
 
     IgnoredException.addIgnoredException(BatchException70.class.getName());
     IgnoredException.addIgnoredException(ServerOperationException.class.getName());
@@ -595,6 +595,9 @@ public class SerialWANPropagationDUnitTest extends WANTestBase {
     inv1.join();
     inv2.join();
 
+
+    vm4.invoke(() -> WANTestBase.validateRegionSize( getTestMethodName() + "_RR_1", 1000 ));
+
     // though region RR_2 is destroyed, RR_1 should still get all the events put
     // in it
     // in local site