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:<10> but was:<9>" type=" > junit.framework.AssertionFailedError">junit.framework > > .AssertionFailedError: expected:<10> but was:<9> > > 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:<10> but was:<2>" type=" > junit.framework.AssertionFailedError">junit.framework > > .AssertionFailedError: expected:<10> but was:<2> > > 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/