← Back to team overview

erma-core team mailing list archive

Fragile Tests

 

I'm chasing my tail a bit trying to do a maven build for Erma. The
main problem is that our tests are really fragile. Some fail when run
in IDEA, some fail when run in Maven, those same tests pass fine when
run alone, or possibly in a different order. We've got a lot of
ThreadLocal voodoo going in the codebase, but seems right now the
tests can only consistently pass when run via the old ant build and in
the order the ant build runs them. This is probably due to running
them via trial and error in the old ant build and adding threadlocal
clearing and start/stop logic as needed to get them to pass.

Anyone have any hints where the usual suspects are in that sort of
failure? For instance, when running the tests in IDEA the
MonitoringEngineTest fails consistently, unless I run it alone, then
it passes fine.

If you're interested in the work so far grab it from my branch.
https://code.launchpad.net/~raykrueger/erma/erma-maven

I'm in the process right now of moving the LoadTests off to their own
module. We should definitely have load tests but having them mixed in
with the unit tests kills productivity. Those also fail with total
randomness, but I expect that given their threading nature. I'll get
to that soon.

(I still need to clean up the duplications in the various pom files,
I'll get there).



Follow ups