You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Barrie Treloar <ba...@gmail.com> on 2008/10/25 02:09:51 UTC
maven-artifact: DefaultWagonManagerTest: suffers windows timestamp resolution issues
DefaultWagonManagerTest has timestamp resolution issues as the test
cases create new files which then have their timestamps checked to see
if the downloaded file is newer than the one on disk.
I know the eclipse:eclipse plugin had similar issues.
I've hacked around it by refactoring the newfile calls into a single
method with a Thread.sleep()...
But since this is common across all test cases was wondering if there
was a standard way to resolve this?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: maven-artifact: DefaultWagonManagerTest: suffers windows timestamp resolution issues
Posted by Barrie Treloar <ba...@gmail.com>.
On Fri, Nov 7, 2008 at 4:26 AM, Brett Porter <br...@apache.org> wrote:
> Thread.sleep shouldn't be needed - usually you can set it to a time in the
> past, then read it back so that you know exactly the right value. Usually
> you need to use a low precision (whole seconds, at least) to get an accurate
> time. The less you can use it, the better.
>
> I don't know of any libraries with common methods for this though.
I think hacked it eclipse pluging to busy loop until currentTime !=
creationTime of File.
But setting the time into the past might make more sense...
Suggestions for where a common routine might be placed?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: maven-artifact: DefaultWagonManagerTest: suffers windows timestamp resolution issues
Posted by Brett Porter <br...@apache.org>.
Thread.sleep shouldn't be needed - usually you can set it to a time in
the past, then read it back so that you know exactly the right value.
Usually you need to use a low precision (whole seconds, at least) to
get an accurate time. The less you can use it, the better.
I don't know of any libraries with common methods for this though.
Cheers,
Brett
On 04/11/2008, at 4:24 PM, Barrie Treloar wrote:
> On Sat, Oct 25, 2008 at 10:39 AM, Barrie Treloar
> <ba...@gmail.com> wrote:
>> DefaultWagonManagerTest has timestamp resolution issues as the test
>> cases create new files which then have their timestamps checked to
>> see
>> if the downloaded file is newer than the one on disk.
>>
>> I know the eclipse:eclipse plugin had similar issues.
>>
>> I've hacked around it by refactoring the newfile calls into a single
>> method with a Thread.sleep()...
>> But since this is common across all test cases was wondering if there
>> was a standard way to resolve this?
>
> ping?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: maven-artifact: DefaultWagonManagerTest: suffers windows timestamp resolution issues
Posted by Barrie Treloar <ba...@gmail.com>.
On Sat, Oct 25, 2008 at 10:39 AM, Barrie Treloar <ba...@gmail.com> wrote:
> DefaultWagonManagerTest has timestamp resolution issues as the test
> cases create new files which then have their timestamps checked to see
> if the downloaded file is newer than the one on disk.
>
> I know the eclipse:eclipse plugin had similar issues.
>
> I've hacked around it by refactoring the newfile calls into a single
> method with a Thread.sleep()...
> But since this is common across all test cases was wondering if there
> was a standard way to resolve this?
ping?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org