[java-support] branch maint-7 updated: Rework tests to hande the fact that on windows times can be equal

Rod Widdowson rdw at steadingsoftware.com
Wed May 29 12:14:09 EDT 2019


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

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

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

The following commit(s) were added to refs/heads/maint-7 by this push:
       new  aea566e   Rework tests to hande the fact that on windows times can be equal
aea566e is described below

commit aea566edb229c74dc25b2ef6b1f63fbea5aafca8
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed May 29 17:14:01 2019 +0100

    Rework tests to hande the fact that on windows times can be equal
---
 .../utilities/java/support/httpclient/IdleConectionSweeperTest.java   | 4 ++--
 1 file changed, 2 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 908c0c8..cfeda09 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
@@ -35,7 +35,7 @@ public class IdleConectionSweeperTest {
 
         IdleConnectionSweeper sweeper = new IdleConnectionSweeper(connectionManager, 30, SWEEP_INTERVAL);
         Thread.sleep(200);
-        Assert.assertTrue(sweeper.scheduledExecutionTime() + SWEEP_INTERVAL > System.currentTimeMillis());
+        Assert.assertTrue(sweeper.scheduledExecutionTime() + SWEEP_INTERVAL >= System.currentTimeMillis());
 
         sweeper.destroy();
         Assert.assertTrue(sweeper.isDestroyed());
@@ -50,7 +50,7 @@ public class IdleConectionSweeperTest {
         Timer timer = new Timer(true);
         sweeper = new IdleConnectionSweeper(connectionManager, 30, SWEEP_INTERVAL, timer);
         Thread.sleep(150);
-        Assert.assertTrue(sweeper.scheduledExecutionTime() + SWEEP_INTERVAL > System.currentTimeMillis());
+        Assert.assertTrue(sweeper.scheduledExecutionTime() + SWEEP_INTERVAL >= System.currentTimeMillis());
 
         sweeper.destroy();
         Assert.assertTrue(sweeper.isDestroyed());

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


More information about the commits mailing list