On Mon, 2008-03-03 at 21:10 +0000, Adam Monsen wrote: 
> Unit tests still fail on the build server, but *succeed* locally on my
> box.

Turns out the "run_test_parallel_2" target was succeeding while the
"run_test" target was failing on my local machine. Ugh. As Van said,
"test ordering dependencies rear their ugly head..."

Unit test refactoring is on the plate post-v1.1.

The unit test failure was caused by certain survey-related unit tests
that blow away the database used during testing (be it Mayfly or MySQL)
in setUp() and/or tearDown() methods. The chart of accounts is
initialized only once (in TestCaseInitializer), and initialization means
adding data to the database. So the workaround for now is if the
database is ever blown away or created from scratch during a unit test,
the chart of accounts must be loaded into the database again.
Re-initializing the chart of accounts was added to
TestDatabase.resetMySQLDatabase() (formerly
HibernateUtil.resetMySQLDatabase()).

The trunk build is fixed as of revision 12360.

-- 
Adam Monsen


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Reply via email to