You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by zh...@apache.org on 2017/10/27 21:54:08 UTC
[geode] branch develop updated: GEODE-3899: add expected exception
for possible race condition (#990)
This is an automated email from the ASF dual-hosted git repository.
zhouxj pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 255f056 GEODE-3899: add expected exception for possible race condition (#990)
255f056 is described below
commit 255f056f97c5d8125d11bdeece82e957476805fc
Author: Xiaojian Zhou <ge...@users.noreply.github.com>
AuthorDate: Fri Oct 27 14:54:05 2017 -0700
GEODE-3899: add expected exception for possible race condition (#990)
---
.../cache/wan/misc/WanAutoDiscoveryDUnitTest.java | 55 ++++++++++++----------
1 file changed, 31 insertions(+), 24 deletions(-)
diff --git a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/misc/WanAutoDiscoveryDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/misc/WanAutoDiscoveryDUnitTest.java
index 63f6005..489dd54 100644
--- a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/misc/WanAutoDiscoveryDUnitTest.java
+++ b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/misc/WanAutoDiscoveryDUnitTest.java
@@ -293,43 +293,50 @@ public class WanAutoDiscoveryDUnitTest extends WANTestBase {
@Test
public void test_LN_Sender_recognises_ALL_NY_Locators() {
+ IgnoredException ie = IgnoredException
+ .addIgnoredException("could not get remote locator information for remote site");
+ try {
+ Integer lnLocPort1 = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
- Integer lnLocPort1 = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
-
- Integer lnLocPort2 = (Integer) vm5.invoke(() -> WANTestBase.createSecondLocator(1, lnLocPort1));
-
- vm2.invoke(() -> WANTestBase.createCache(lnLocPort1, lnLocPort2));
+ Integer lnLocPort2 =
+ (Integer) vm5.invoke(() -> WANTestBase.createSecondLocator(1, lnLocPort1));
- vm2.invoke(() -> WANTestBase.createSender("ln", 2, false, 100, 10, false, false, null, true));
+ vm2.invoke(() -> WANTestBase.createCache(lnLocPort1, lnLocPort2));
- Integer nyLocPort1 =
- (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnLocPort1));
+ vm2.invoke(() -> WANTestBase.createSender("ln", 2, false, 100, 10, false, false, null, true));
- vm2.invoke(() -> WANTestBase.startSender("ln"));
+ Integer nyLocPort1 =
+ (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnLocPort1));
- // Since to fix Bug#46289, we have moved call to initProxy in getConnection which will be called
- // only when batch is getting dispatched.
- // So for locator discovery callback to work, its now expected that atleast try to send a batch
- // so that proxy will be initialized
- vm2.invoke(
- () -> WANTestBase.createReplicatedRegion(getTestMethodName() + "_RR", "ln", isOffHeap()));
+ vm2.invoke(() -> WANTestBase.startSender("ln"));
- vm2.invoke(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 10));
+ // Since to fix Bug#46289, we have moved call to initProxy in getConnection which will be
+ // called
+ // only when batch is getting dispatched.
+ // So for locator discovery callback to work, its now expected that atleast try to send a
+ // batch
+ // so that proxy will be initialized
+ vm2.invoke(
+ () -> WANTestBase.createReplicatedRegion(getTestMethodName() + "_RR", "ln", isOffHeap()));
- Integer nyLocPort2 = (Integer) vm3
- .invoke(() -> WANTestBase.createSecondRemoteLocator(2, nyLocPort1, lnLocPort1));
+ vm2.invoke(() -> WANTestBase.doPuts(getTestMethodName() + "_RR", 10));
- InetSocketAddress locatorToWaitFor = new InetSocketAddress("localhost", nyLocPort2);
+ Integer nyLocPort2 = (Integer) vm3
+ .invoke(() -> WANTestBase.createSecondRemoteLocator(2, nyLocPort1, lnLocPort1));
- vm2.invoke(() -> WANTestBase.checkLocatorsinSender("ln", locatorToWaitFor));
+ InetSocketAddress locatorToWaitFor = new InetSocketAddress("localhost", nyLocPort2);
- Integer nyLocPort3 = (Integer) vm4
- .invoke(() -> WANTestBase.createSecondRemoteLocator(2, nyLocPort1, lnLocPort1));
+ vm2.invoke(() -> WANTestBase.checkLocatorsinSender("ln", locatorToWaitFor));
- InetSocketAddress locatorToWaitFor2 = new InetSocketAddress("localhost", nyLocPort3);
+ Integer nyLocPort3 = (Integer) vm4
+ .invoke(() -> WANTestBase.createSecondRemoteLocator(2, nyLocPort1, lnLocPort1));
- vm2.invoke(() -> WANTestBase.checkLocatorsinSender("ln", locatorToWaitFor2));
+ InetSocketAddress locatorToWaitFor2 = new InetSocketAddress("localhost", nyLocPort3);
+ vm2.invoke(() -> WANTestBase.checkLocatorsinSender("ln", locatorToWaitFor2));
+ } finally {
+ ie.remove();
+ }
}
@Test
--
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].