[Biojava-dev] Build system changes
Thomas Down
thomas at derkholm.net
Tue Jan 20 03:52:29 EST 2004
Once upon a time, Len Trigg wrote:
> Thomas Down wrote:
> > Quicker, less painful test runs == more testing -- that's
> > the theory, anyway. The other thing that's worthwhile in principle
> > is running all the tests in a single VM. Unfortunately, when
> > I tried that I ran into bad memory trouble. The ideal solution
> > would be to run groups of tests together, but this might mean we
> > have to write our own test runner.
>
> Usually if you have memory problems when running many tests, it means
> that your teardown methods somewhere aren't properly implemented (or
> you have tons of static fields in your class library).
I'd rather assumed (and I think most other biojava test authors
have done the same) that the TestCases are released once they've
been run, so it's only necessary to do explicit cleanup if you've
created objects which get registered elsewhere. The only cases of
this I can think of in BJ core code are stuff getting cached in
AlphabetManager (which should be fixed now).
If the TestCases are hanging around after they've been run, that
could very well explain the leaks...
> The automated build system we use here does a recursive object
> traversal of the Suite object via reflection after running the tests
> and warns us of any unexpected object references loitering around.
Does this mean that you explicitly null-ify all your fields
in the tearDown method?
> Running the tests all in one VM is way faster than doing them
> individually.
Yes :-).
Thomas.
More information about the biojava-dev
mailing list