[hibernate-dev] [Fwd: hibernate-mysql50-testsuite Build CompletedWith Testsuite Errors]

Steve Ebersole steve.ebersole at jboss.com
Tue Dec 5 09:48:09 EST 2006


It should only be a problem with the last of the test cases.  Basically,
Hibernate tries to create and drop the schema needed for a particular
test class once.  However, this ability to run some piece of code once
per test class is a deficiency in JUnit.  The Hibernate test suite tries
to achieve that by some magic in on overridden version of setup.

AFAICT, the only real options involve using a different test framework.
TestNG (or even JUnit4 for that matter) offer the ability to perform
initialization and clean-up *once per test class*.

The other alternative is to (re)create the schema as part of
setup/teardown for *each test method*, which is unacceptable.

Perhaps something could be achieved by extension of JUnit.  I had
previously looked at junit.extensions.TestSetup for example.  But that
required pretty extensive changes to the test suite to accommodate.

I am certainly open to suggestions...

-----Original Message-----
From: Aleksandar Kostadinov [mailto:akostadinov at jboss.com] 
Sent: Monday, December 04, 2006 2:56 PM
To: Darryl Miles; Steve Ebersole; hibernate-dev at lists.jboss.org
Subject: Re: [hibernate-dev] [Fwd: hibernate-mysql50-testsuite Build
CompletedWith Testsuite Errors]

Now we test with mysql connector 5.0.4

Darryl, you want to see some info on the first page or in the
host-version-info.txt?
I see the latter easier to achieve and at this time cannot say anything
about the first one.
Anyway in this repo you can find the cruisecontrol configuration files
svn.jboss.org/repos/qa/cruisecontrol/trunk/
scripts/cruisecontrol/build-hibernate-db-matrix.xml is the build file
for hibernate
target to look at is maybe copyresults (just on my first look)

I think that if it will be very useful for developers such a thing could
be done but I see another problem with hibernate tests that should be
resolved. I see tables and procedures not dropped after the tests and I
think after some time they break things. Could you think of something
that cleans the database defore testing or after testing? Is it possible
to create a target in the hibernate's build file which cleans the
database and nothing else? That ways you could get more accurate results
and in case of database connectivity problems only qa team get informed.

Darryl Miles wrote:

>
> Steve Ebersole wrote:
> > Um, perhaps if you are going to ask me to do something you could can
> the
> > attitude?  Seems like a basic requirement to me...
>
>
> Sorry if I put words in your mouth there or seem to be creating lots
> of work for somebody else.
>
> Is the cruise control configuration / testing regime checked into a
> repository; maybe I can assist with these changes and attach a patch
> rather than open a JIRA feature request ?
>
>
> Darryl






More information about the hibernate-dev mailing list