Hi!

I've had my shear of problems running the junit tests from inside eclipse,
and now I've found out why :)

Running the junit tests from the command line seems always to work, but from
eclipse I constantly get "No persisters found for XXX" where XXX is some
class being saved in the test.

The problem is that the junit test assumes that only one test is created at
the time AND that the suite() method is invoked before running the tests -
all this is correctly assumed when using the standard junit runner, but no
from within eclipse where one have much more fine grained control and
eclipse is being "intelligent" :)

1. It does not invoke the suite() method if you just try to do "Run
As...->JUnit test"
2. And when trying to run more or all test in a certain folder/project then
it instantiate all tests before running the actual tests! That conflict with
the usage of the static sessions variable in TestCase :(

Have noone else have these problems ? Are you all runing it via cmdline or
the ant file ?

Notice that eclipse is just assuming that all tests are selfcontained (as
they should be) and that everything is being configured via setup and
teardown methods.

How about we changed the test suite to be more self contained ? (e.g. having
a non-static holder for the sessions ?, and only recreate the database if
this field is null ?)

/max



-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will
allow you to extend the highest allowed 128 bit encryption to all your 
clients even if they use browsers that are limited to 40 bit encryption. 
Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to