You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2015/06/19 20:21:32 UTC
Fwd: [jira] [Created] (IO-481) org.apache.commons.io.FileUtils#waitFor
waits too long
Kristian,
It looks like you've solved your Jira admin issues :-)
Gary
---------- Forwarded message ----------
From: Kristian Rosenvold (JIRA) <ji...@apache.org>
Date: Fri, Jun 19, 2015 at 11:20 AM
Subject: [jira] [Created] (IO-481) org.apache.commons.io.FileUtils#waitFor
waits too long
To: issues@commons.apache.org
Kristian Rosenvold created IO-481:
-------------------------------------
Summary: 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
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)
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: [jira] [Created] (IO-481) org.apache.commons.io.FileUtils#waitFor
waits too long
Posted by Kristian Rosenvold <kr...@gmail.com>.
No, I just created a regular issue like a regular guy from the street. I
cant assign issues to me or close issues as fixed.
Kristian
2015-06-19 20:21 GMT+02:00 Gary Gregory <ga...@gmail.com>:
> Kristian,
>
> It looks like you've solved your Jira admin issues :-)
>
> Gary
>
> ---------- Forwarded message ----------
> From: Kristian Rosenvold (JIRA) <ji...@apache.org>
> Date: Fri, Jun 19, 2015 at 11:20 AM
> Subject: [jira] [Created] (IO-481) org.apache.commons.io.FileUtils#waitFor
> waits too long
> To: issues@commons.apache.org
>
>
> Kristian Rosenvold created IO-481:
> -------------------------------------
>
> Summary: 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
>
>
> 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)
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>