[hibernate-dev] metamodel work
Gail Badner
gbadner at redhat.com
Wed May 23 14:25:16 EDT 2012
----- Original Message -----
> From: "Steve Ebersole" <steve at hibernate.org>
> To: "Gail Badner" <gbadner at redhat.com>
> Cc: "Hibernate" <hibernate-dev at lists.jboss.org>, "Hardy Ferentschik" <hardy at hibernate.org>
> Sent: Wednesday, May 23, 2012 11:14:09 AM
> Subject: Re: [hibernate-dev] metamodel work
>
> On Wed 23 May 2012 01:05:19 PM CDT, Gail Badner wrote:
>
> > I seem to be the only one writing tests that extend
> > BaseCoreFunctionalTestCase with
> > hibernate.test.new_metadata_mapping=true. I've been doing this to
> > ensure that the metamodel info is translated into the persisters
> > properly and that standard operations (i.e., SQL and bound
> > parameters) are being executed properly.
>
> Well thats also not the only way to write tests for targetting the
> new
> metamodel. Most of the tests I write at least for metamodel work are
> in fact not functional tests. So I don't try to to fit them into
> there
> since they don't fit.
I agree it's not the only way to write tests. It is a simple way that helps me do my work. I also agree these are not functional tests. They are more like use case tests, as are many of the matrix tests. They test that it works end-to-end.
>
> > TBH, I find it interesting that the people that are not actually
> > doing this work think that simply being able to toggle a
> > configuration parameter is a waste of time...
>
> Has nothing to do with toggling a switch. Really you are forcing
> that
> Configuration (as is) and org.hibernate.mapping be kept around past
> their useful lifecycle because now you are introducing tests that
> require that. This is the exact same story I related to you wrt HQL
> testing. And actually its even worse than the HQL tests because here
> there arent even assertions that assert that both paths result in the
> same thing; instead you just manually check that by eye.
I can do a lot with a script that does the diffs, which could also be checked into src/test/resources. I would say it's a whole lot better than nothing.
Ultimately, hibernate.test.new_metadata_mappings will go away when Configuration is removed, and so will the ability to toggle the tests.
>
>
>
> --
> steve at hibernate.org
> http://hibernate.org
>
More information about the hibernate-dev
mailing list