Repository: incubator-geode
Updated Branches:
refs/heads/develop 0e2b53bcb -> c454d3ab7
GEODE-1731: Reordered the creation of test elements
* The test now initiates the killing of second sender after it has
received one batch.
* Reordered the creation of cache, region and finally the receivers and
senders.
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c454d3ab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c454d3ab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c454d3ab
Branch: refs/heads/develop
Commit: c454d3ab7c24d771b1b222944c2518eea69ff1df
Parents: 0e2b53b
Author: nabarun <[email protected]>
Authored: Tue Oct 4 14:06:45 2016 -0700
Committer: nabarun <[email protected]>
Committed: Wed Oct 5 10:24:53 2016 -0700
----------------------------------------------------------------------
...oncurrentParallelGatewaySenderDUnitTest.java | 40 +++++++++++---------
1 file changed, 23 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c454d3ab/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderDUnitTest.java
----------------------------------------------------------------------
diff --git
a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderDUnitTest.java
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderDUnitTest.java
index 8adc68c..3451b51 100644
---
a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderDUnitTest.java
+++
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/concurrent/ConcurrentParallelGatewaySenderDUnitTest.java
@@ -586,7 +586,6 @@ public class ConcurrentParallelGatewaySenderDUnitTest
extends WANTestBase {
getTestMethodName(), 1000 ));
}
- @Category(FlakyTest.class) // GEODE-1731
@Test
public void testPartitionedParallelPropagationHA() throws Exception {
IgnoredException.addIgnoredException(SocketException.class.getName()); //
for Connection reset
@@ -594,10 +593,25 @@ public class ConcurrentParallelGatewaySenderDUnitTest
extends WANTestBase {
Integer nyPort = (Integer)vm1.invoke(() ->
WANTestBase.createFirstRemoteLocator( 2, lnPort ));
createCacheInVMs(nyPort, vm2, vm3);
+
+ vm2.invoke(() -> WANTestBase.createPartitionedRegion(
+ getTestMethodName() + "_PR", null, 1, 100, isOffHeap() ));
+ vm3.invoke(() -> WANTestBase.createPartitionedRegion(
+ getTestMethodName() + "_PR", null, 1, 100, isOffHeap() ));
+
createReceiverInVMs(vm2, vm3);
createCacheInVMs(lnPort, vm4, vm5, vm6, vm7);
+ vm4.invoke(() -> WANTestBase.createPartitionedRegion(
+ getTestMethodName() + "_PR", "ln", 2, 100, isOffHeap() ));
+ vm5.invoke(() -> WANTestBase.createPartitionedRegion(
+ getTestMethodName() + "_PR", "ln", 2, 100, isOffHeap() ));
+ vm6.invoke(() -> WANTestBase.createPartitionedRegion(
+ getTestMethodName() + "_PR", "ln", 2, 100, isOffHeap() ));
+ vm7.invoke(() -> WANTestBase.createPartitionedRegion(
+ getTestMethodName() + "_PR", "ln", 2, 100, isOffHeap() ));
+
vm4.invoke(() -> WANTestBase.createConcurrentSender( "ln", 2,
true, 100, 10, false, false, null, true, 6, OrderPolicy.KEY ));
vm5.invoke(() -> WANTestBase.createConcurrentSender( "ln", 2,
@@ -606,33 +620,25 @@ public class ConcurrentParallelGatewaySenderDUnitTest
extends WANTestBase {
true, 100, 10, false, false, null, true, 6, OrderPolicy.KEY ));
vm7.invoke(() -> WANTestBase.createConcurrentSender( "ln", 2,
true, 100, 10, false, false, null, true, 6, OrderPolicy.KEY ));
-
- vm4.invoke(() -> WANTestBase.createPartitionedRegion(
- getTestMethodName() + "_PR", "ln", 2, 100, isOffHeap() ));
- vm5.invoke(() -> WANTestBase.createPartitionedRegion(
- getTestMethodName() + "_PR", "ln", 2, 100, isOffHeap() ));
- vm6.invoke(() -> WANTestBase.createPartitionedRegion(
- getTestMethodName() + "_PR", "ln", 2, 100, isOffHeap() ));
- vm7.invoke(() -> WANTestBase.createPartitionedRegion(
- getTestMethodName() + "_PR", "ln", 2, 100, isOffHeap() ));
startSenderInVMs("ln", vm4, vm5, vm6, vm7);
- vm2.invoke(() -> WANTestBase.createPartitionedRegion(
- getTestMethodName() + "_PR", null, 1, 100, isOffHeap() ));
- vm3.invoke(() -> WANTestBase.createPartitionedRegion(
- getTestMethodName() + "_PR", null, 1, 100, isOffHeap() ));
-
AsyncInvocation inv1 = vm7.invokeAsync(() -> WANTestBase.doPuts(
getTestMethodName() + "_PR", 5000 ));
+
vm2.invoke(() -> Awaitility.await().atMost(30000,
TimeUnit.MILLISECONDS).until(() ->
assertEquals("Failure in waiting for at least 10 events to be received
by the receiver",
true, (getRegionSize(getTestMethodName() + "_PR") > 10 ))));
+
AsyncInvocation inv2 = vm4.invokeAsync(() -> WANTestBase.killSender());
+
AsyncInvocation inv3 = vm6.invokeAsync(() -> WANTestBase.doPuts(
getTestMethodName() + "_PR", 10000 ));
+
vm2.invoke(() -> Awaitility.await().atMost(30000,
TimeUnit.MILLISECONDS).until(() ->
- assertEquals("Failure in waiting for additional 2000 events to be
received by the receiver ",
- true,getRegionSize(getTestMethodName() + "_PR") > 7000 )));
+ assertEquals("Failure in waiting for additional 10 events to be received
by the receiver ",
+ true,getRegionSize(getTestMethodName() + "_PR") > 5010 )));
+
AsyncInvocation inv4 = vm5.invokeAsync(() -> WANTestBase.killSender());
+
inv1.join();
inv2.join();
inv3.join();