ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: ArtifactLockStrategyTest.testConcurrentResolve failure
Date Fri, 07 Dec 2007 11:43:36 GMT
On Dec 7, 2007 10:12 AM, Gilles Scokart <gscokart@gmail.com> 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/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message