[java-support] branch master updated: IdleConnectionSweeper: Use a bigger hammer for Windows+VM+Java>8 bug

Rod Widdowson rdw at steadingsoftware.com
Thu Aug 15 04:00:39 EDT 2019


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

rdw pushed a commit to branch master
in repository java-support.

View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=3500a5dc0817c037ba308736d309d2dea39f4dfd

The following commit(s) were added to refs/heads/master by this push:
       new  3500a5d   IdleConnectionSweeper: Use a bigger hammer for Windows+VM+Java>8 bug
3500a5d is described below

commit 3500a5dc0817c037ba308736d309d2dea39f4dfd
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Aug 15 09:00:23 2019 +0100

    IdleConnectionSweeper: Use a bigger hammer for Windows+VM+Java>8 bug
---
 .../utilities/java/support/httpclient/IdleConectionSweeperTest.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/test/java/net/shibboleth/utilities/java/support/httpclient/IdleConectionSweeperTest.java b/src/test/java/net/shibboleth/utilities/java/support/httpclient/IdleConectionSweeperTest.java
index 68b87dd..977bd72 100644
--- a/src/test/java/net/shibboleth/utilities/java/support/httpclient/IdleConectionSweeperTest.java
+++ b/src/test/java/net/shibboleth/utilities/java/support/httpclient/IdleConectionSweeperTest.java
@@ -66,11 +66,12 @@ public class IdleConectionSweeperTest {
         if (!connectionManager.isCloseCalled()) {
             Thread.sleep(SWEEP_INTERVAL.toMillis());
             Thread.yield();
-            if (!connectionManager.isCloseCalled()) {
+            int loopCount = 0;
+            while (!connectionManager.isCloseCalled()) {
                 // Windows sometimes takes its time...
                 Thread.sleep(SWEEP_INTERVAL.toMillis());
                 Thread.yield();
-                Assert.assertTrue(connectionManager.isCloseCalled());
+                Assert.assertTrue(++loopCount != 5); // 5 time 50 ms is quarter of a second
             }
         }
 

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


More information about the commits mailing list