This is an automated email from the ASF dual-hosted git repository.

wirebaron 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 a76d44d  GEODE-5465: prevent calling socket.accept in 
GMSHealthMonitorJUnitTest (#2180)
a76d44d is described below

commit a76d44da4d3543cb3a1c2e5f7312987f98c5783a
Author: Brian Rowe <[email protected]>
AuthorDate: Wed Jul 25 10:46:25 2018 -0700

    GEODE-5465: prevent calling socket.accept in GMSHealthMonitorJUnitTest 
(#2180)
---
 .../internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
 
b/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
index c2b3e97..56bd7da 100644
--- 
a/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
+++ 
b/geode-core/src/integrationTest/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
@@ -877,7 +877,9 @@ public class GMSHealthMonitorJUnitTest {
 
     @Override
     public Socket accept() throws IOException {
-      return wrappedSocket.accept();
+      // It's expected that the GMSHealthMonitor will start shut down prior to 
calling this accept,
+      // but to prevent hanging on the rare race where that doesn't happen, 
throw this exception.
+      throw new IOException("Unable to handle accept call.");
     }
 
     @Override

Reply via email to