[java-identity-provider] branch main updated: Introduce a wait if open connections are found.

Daniel Fisher dfisher at vt.edu
Wed Nov 16 01:11:38 UTC 2022


This is an automated email from the git hooks/post-receive script.

dfisher pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=0865079ccf717b6e3eaeb7b357487363d3b5dce7

The following commit(s) were added to refs/heads/main by this push:
     new 0865079cc Introduce a wait if open connections are found.
0865079cc is described below

commit 0865079ccf717b6e3eaeb7b357487363d3b5dce7
Author: Daniel Fisher <dfisher at vt.edu>
AuthorDate: Tue Nov 15 20:07:44 2022 -0500

    Introduce a wait if open connections are found.
    
    Nightly test infrastructure may be taking longer for the Socket to set the isClosed flag.
---
 .../net/shibboleth/idp/authn/impl/JAASCredentialValidatorTest.java   | 5 ++++-
 .../net/shibboleth/idp/authn/impl/LDAPCredentialValidatorTest.java   | 5 ++++-
 .../java/net/shibboleth/idp/authn/impl/ValidateCredentialsTest.java  | 5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/JAASCredentialValidatorTest.java b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/JAASCredentialValidatorTest.java
index fc3383114..97bae92b6 100644
--- a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/JAASCredentialValidatorTest.java
+++ b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/JAASCredentialValidatorTest.java
@@ -86,7 +86,10 @@ public class JAASCredentialValidatorTest extends BaseAuthenticationContextTest {
     /**
      * Shutdown the in-memory directory server.
      */
-    @AfterClass public void teardownDirectoryServer() {
+    @AfterClass public void teardownDirectoryServer() throws Exception {
+        if (directoryServer.openConnectionCount() > 0) {
+            Thread.sleep(100);
+        }
         assertEquals(directoryServer.openConnectionCount(), 0);
         directoryServer.stop(true);
     }
diff --git a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/LDAPCredentialValidatorTest.java b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/LDAPCredentialValidatorTest.java
index 96a07ff66..d3e2ccead 100644
--- a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/LDAPCredentialValidatorTest.java
+++ b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/LDAPCredentialValidatorTest.java
@@ -110,7 +110,10 @@ public class LDAPCredentialValidatorTest extends BaseAuthenticationContextTest {
     /**
      * Shutdown the in-memory directory server.
      */
-    @AfterClass public void teardownDirectoryServer() {
+    @AfterClass public void teardownDirectoryServer() throws Exception {
+        if (directoryServer.openConnectionCount() > 0) {
+            Thread.sleep(100);
+        }
         assertEquals(directoryServer.openConnectionCount(), 0);
         directoryServer.stop(true);
     }
diff --git a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateCredentialsTest.java b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateCredentialsTest.java
index db67d3469..a8307aff6 100644
--- a/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateCredentialsTest.java
+++ b/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateCredentialsTest.java
@@ -100,7 +100,10 @@ public class ValidateCredentialsTest extends BaseAuthenticationContextTest {
     /**
      * Shutdown the in-memory directory server.
      */
-    @AfterClass public void teardownDirectoryServer() {
+    @AfterClass public void teardownDirectoryServer() throws Exception {
+        if (directoryServer.openConnectionCount() > 0) {
+            Thread.sleep(100);
+        }
         assertEquals(directoryServer.openConnectionCount(), 0);
         directoryServer.stop(true);
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list