On Tue, Dec 16, 2008 at 5:45 PM, James Adams <monoco...@gmail.com> wrote:

> Yes I get the same thing from within the IDE -- a full build fails with the
> same errors as when using command line.


So, if you can run the same tests without Maven and get the same errors,
that seems to point pretty conclusively to the tests themselves.


> I am getting errors such as the number of expected objects found in the
> database are greater than what was expected.  I am running my DAO tests
> using an embedded HSQLDB database, so I expect to start with a fresh table
> every time, then do some inserts, etc., then do a find call to see how many
> are in the table, and then make an assertion based on the expected number,
> and this is where it fails when running a full build.  I also get errors
> for
> a test which is listening to a message queue for messages to be consumed,
> and this one fails as often as not during a full build but passes every
> time
> when running by itself.


If the tests leaving things in the database, I'm vaguely surprised that
running a single test twice doesn't have the same problem.  Although if
you're using an Embedded HSQLDB, perhaps you're not persisting the database.
 You could try and verify the database state in an @AfterTransaction call if
you're using the annotated spring test runner.  Sounds like the database
rollback isn't working as expected, to me -- although it's difficult to tell
over an email conversation.  ;)


>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Tests-run-fine-individually%2C-but-some-fail-when-run-as-part-of-%27mvn-install%27-tp21019373p21043481.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/

Reply via email to