[spring-extensions] branch master updated: File dates screw us agaim. Fix with feeling (and three part harmony)

Rod Widdowson rdw at steadingsoftware.com
Mon Aug 7 08:24:17 EDT 2017


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

rdw pushed a commit to branch master
in repository spring-extensions.

View the commit online:
http://git.shibboleth.net/view/?p=spring-extensions.git;a=commit;h=f80151bc6af8273fcdfd7c141b200d136472b5d4

The following commit(s) were added to refs/heads/master by this push:
       new  f80151b   File dates screw us agaim.  Fix with feeling (and three part harmony)
f80151b is described below

commit f80151bc6af8273fcdfd7c141b200d136472b5d4
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Aug 7 13:24:08 2017 +0100

    File dates screw us agaim.  Fix with feeling (and three part harmony)
---
 .../java/net/shibboleth/ext/spring/resource/RunnableResourceTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/net/shibboleth/ext/spring/resource/RunnableResourceTest.java b/src/test/java/net/shibboleth/ext/spring/resource/RunnableResourceTest.java
index 3b0a51b..682ebeb 100644
--- a/src/test/java/net/shibboleth/ext/spring/resource/RunnableResourceTest.java
+++ b/src/test/java/net/shibboleth/ext/spring/resource/RunnableResourceTest.java
@@ -109,7 +109,7 @@ public class RunnableResourceTest {
     
     @Test public void testResource() throws ScriptException, ComponentInitializationException, IOException, InterruptedException {
         
-        final long now = System.currentTimeMillis();
+        final long now = new File(fileName).lastModified();
         final EvaluableScript script = new EvaluableScript("custom.update();");
         final ScriptedRunnable runnable = new ScriptedRunnable();
         runnable.setCustomObject(object);
@@ -140,7 +140,7 @@ public class RunnableResourceTest {
         
         Assert.assertTrue(modified >= now);
         Thread.sleep(20);
-        Assert.assertTrue(modified <= System.currentTimeMillis());
+        Assert.assertTrue(modified <= new File(fileName).lastModified());
         
     }
     

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


More information about the commits mailing list