[hibernate-dev] Unit test failures using the new metamodel

Hardy Ferentschik hardy at hibernate.org
Fri Aug 3 20:32:20 EDT 2012


On 3 Jan 2012, at 11:35 PM, Gail Badner wrote:

> Now I'm seeing the following failures with the old metadata (using hibernate.test.new_metadata_mappings=false):
> Test org.hibernate.test.annotations.interfaces.InterfacesTest FAILED
> Test org.hibernate.test.annotations.lob.VersionedLobTest FAILED
> Test org.hibernate.test.annotations.idmanytoone.alphabetical.AlphabeticalIdManyToOneTest FAILED
> 
> It looks like BaseAnnotationBindingTestCase is hard-coded to use the new metamodel, since it fails for the new metamodel, it still fails with hibernate.test.new_metadata_mappings=false.

That's right, the test will always use the new metamodel now. I think this is the way forward for these tests in particular. The new setup is imo much more suited for these tests and at least now there
are assertions (before there were not even assertions. the test basically was "successful" when the setup worked)
I see myself writing more of these type of tests. I think the problem is that CustomRunner only processes the FailureExpectedWithNewMetamodel depending on the USE_NEW_METADATA_MAPPINGS flag.
Instead of the flag I think it should actually check which type of configuration is/was used and process accordingly.

--Hardy




More information about the hibernate-dev mailing list