ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <epr...@ptc.com>
Subject Re: unit test failure w/junit task
Date Wed, 05 Mar 2003 21:00:54 GMT


Jim Allers wrote:
> jvb.dll is probably a JNI library used during your test.
> 
> You should fork your tests when running. "junit" has a "fork" property.
> 
> The error means exactly what it says. "jvb.dll" cannot be loaded by more
> than one classloader. If the classloader that loaded jvb.dll is garbage
> collected, then "jvb.dll" can be loaded again by a different
> classloader. Since there is no way of guaranteeing that a classloader is
> garbage collected, I recommend forking.
> 
> If you're really adventurous, there are various ways you can try to
> solve the problem without creating a new process, but I think you'll
> have to ask some real experts.

Arg.  I don't know anything about JNI and classloaders.  I'm using a 3rd 
party library to make a connection to a remote application in my setUp() 
method so I can retrieve an object, then I'm using that same library to 
make a separate connection to the remote application to retrieve another 
object to perform assertEquals() tests etc.

I will hunt down some references to "forking", but I'm skeptical that 
this will solve my problem since the concurrent accesses are happening 
within the same unit test.

Thanks Jim,


Erik


Mime
View raw message