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 Thu, 06 Mar 2003 13:09:16 GMT


Steve Loughran wrote:

>>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.
> 
> 
> The problem could be that your setUp() method gets called before every test
> method, so the library gets loaded multiple times. Try moving whatever loads
> the library to something static that runs once, or clean up fully in
> teardown().

Would the constructor be the appropriate place for that?  Or a 
non-static initializer block?

Thanks Steve,


Erik


Mime
View raw message