I tried to test it a few time from the command line with only that test and in 
those case it works.
It is only when I run all of them that I have the issue.

I suspect it might be triggered by the garbage collector put some load at the 
wrong moment.

I hope it will be reproducible with tracing enabled.

Gilles

> -----Original Message-----
> From: Xavier Hanin [mailto:[EMAIL PROTECTED]
> Sent: vendredi 7 décembre 2007 12:44
> To: Ant Developers List
> Subject: Re: ArtifactLockStrategyTest.testConcurrentResolve failure
> 
> On Dec 7, 2007 10:12 AM, Gilles Scokart <[EMAIL PROTECTED]> wrote:
> 
> >
> >
> >
> >
> > I got this when running ant test:
> >
> >
> >
> >  <testcase classname="org.apache.ivy.plugins.lock.ArtifactLockStrategyTest"
> > name="testConcurrentResolve" time="16.312">
> >
> >    <failure message="expected:&lt;10&gt; but was:&lt;9&gt;" type="
> > junit.framework.AssertionFailedError">junit.framework
> >
> > .AssertionFailedError: expected:&lt;10&gt; but was:&lt;9&gt;
> >
> >        at
> > org.apache.ivy.plugins.lock.ArtifactLockStrategyTest.testConcurrentResolve
> > (ArtifactLockStrategyTest.java:72)
> >
> > </failure>
> >
> >
> >
> > The second time, I got this :
> >
> >  <testcase classname="org.apache.ivy.plugins.lock.ArtifactLockStrategyTest"
> > name="testConcurrentResolve" time="10.344">
> >
> >    <failure message="expected:&lt;10&gt; but was:&lt;2&gt;" type="
> > junit.framework.AssertionFailedError">junit.framework
> >
> > .AssertionFailedError: expected:&lt;10&gt; but was:&lt;2&gt;
> >
> >        at
> > org.apache.ivy.plugins.lock.ArtifactLockStrategyTest.testConcurrentResolve
> > (ArtifactLockStrategyTest.java:72)
> >
> > </failure>
> >
> >  </testcase>
> >
> >
> >
> >
> >
> > Is it only me?
> >
> >
> >
> > And of curse, I can't reproduce it in eclipse.
> >
> >
> >
> > I'm using an ibm jvm 1.5 in both command line and in eclipse.
> 
> It maybe due to your environment, including your filesystem, since locking
> rely on the filesystem. I've tested with sun jvm 1.5 and 1.6, on windows
> Vista, windows XP and linux.
> 
> It may also simply be due to a slowness of your box, try to increase the
> join time at the end of the test (use 60000 instead of 10000) for instance),
> and see if it works. To get more details on what is happenning  you can set
> debugging to true on the lock strategy in the test:
>     private CacheManager newCacheManager(IvySettings settings) {
>         CacheManager cacheManager = new CacheManager(settings, new
> File("build/test/cache"));
>         cacheManager.setLockStrategy(new ArtifactLockStrategy(*true*));
>         return cacheManager;
>     }
> 
> Xavier
> 
> 
> >
> >
> >
> >
> >
> >
> > Gilles
> >
> >
> 
> 
> --
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://ant.apache.org/ivy/
> http://www.xoocode.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to