commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Rosenvold (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (IO-481) org.apache.commons.io.FileUtils#waitFor waits too long
Date Tue, 23 Jun 2015 17:43:00 GMT

     [ https://issues.apache.org/jira/browse/IO-481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kristian Rosenvold closed IO-481.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.5
         Assignee: Kristian Rosenvold

Fixed in r1687108

> org.apache.commons.io.FileUtils#waitFor waits too long
> ------------------------------------------------------
>
>                 Key: IO-481
>                 URL: https://issues.apache.org/jira/browse/IO-481
>             Project: Commons IO
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Kristian Rosenvold
>            Assignee: Kristian Rosenvold
>             Fix For: 2.5
>
>
> The timing algorithm is basically broken, since Thread.sleep is imprecise. There is also
a counter error in the looping code. 
> The following testcase will never run in less than 4 seconds on my machine
>   public void testRealWallTime() {
>         long start = System.currentTimeMillis();
>         FileUtils.waitFor(new File(""), 2);
>         System.out.println("elapsed = " + (System.currentTimeMillis() - start));
>     }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message