GEODE-2875 shutdown is taking as long as 20 seconds The fix for this issue causes one of the test cases in LocatorDUnitTest to fail consistently. With the fix we don't create any TCP/IP connections in this test during startup but the test expects one to have been created and it expects the connection's reader-thread to have initiated suspect processing.
The test needs to be altered to ensure that this thread has been created by sending message that requires a reply. The reply will be sent over the expected connection, ensuring that there is a reader-thread. Project: http://git-wip-us.apache.org/repos/asf/geode/repo Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/48f6e11a Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/48f6e11a Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/48f6e11a Branch: refs/heads/feature/GEODE-2900 Commit: 48f6e11adb84145187f9b1f715b6b368d94cee68 Parents: efbe53c Author: Bruce Schuchardt <[email protected]> Authored: Fri May 12 14:38:49 2017 -0700 Committer: Bruce Schuchardt <[email protected]> Committed: Fri May 12 14:40:05 2017 -0700 ---------------------------------------------------------------------- .../test/java/org/apache/geode/distributed/LocatorDUnitTest.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode/blob/48f6e11a/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java ---------------------------------------------------------------------- diff --git a/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java index 6f01f90..8ff9b67 100644 --- a/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java @@ -42,6 +42,7 @@ import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import org.apache.geode.distributed.internal.HighPriorityAckedMessage; import org.apache.geode.test.dunit.AsyncInvocation; import org.awaitility.Awaitility; import org.apache.geode.ForcedDisconnectException; @@ -90,6 +91,7 @@ import org.junit.experimental.categories.Category; import java.io.File; import java.io.IOException; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Properties; import java.util.Set; @@ -828,6 +830,8 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase { (DistributionManager) ((InternalDistributedSystem) sys).getDistributionManager(); MyMembershipListener listener = new MyMembershipListener(); dm.addMembershipListener(listener); + // ensure there is an unordered reader thread for the member + new HighPriorityAckedMessage().send(Collections.singleton(mem1), false); // disconnect the first vm and demonstrate that the third vm and the // locator notice the failure and exit
