[hibernate-dev] Unit test failures using the new metamodel
Steve Ebersole
steve at hibernate.org
Mon Aug 6 09:24:42 EDT 2012
On 08/02/2012 12:56 AM, Gail Badner wrote:
> These tests fail with org.hibernate.cfg.NotYetImplementedException when the sources are being processed. For some reason. this failure is not recognized as an expected failure. I'm not sure of the reason for this.
I was looking at this a little before I left for vacation (not these
specific failures, just the general phenomenon). As far as I can tell
it is a problem in the hibernate-testing code (and perhaps a change in
JUnit between when that code was originally developed and the versions
of JUnit used now). JUnit now seems to just "eat" startup (@Before,
etc) errors and the "failure expected" handling code does not hook in to
the startup/shutdown process, its only in effect during the actual run.
I added a dump of the exception when this happened so we could at least
see the cause of the test not being run. But I never had a chance to
go back and look after John added the @FailureExpectedWithNewMetamodel
hooks. So not sure if this is still related.
> It seems that now would be a good time to make both hibernate.test.new_metadata_mappings=true and hibernate.test.validatefailureexpected=true the default when building. That way we'll know when to remove @FailureExpectedWithNewMetamodel from tests that succeed due to added functionality. It will also help us know when there are regressions.
+1000 that 'hibernate .test.new_metadata_mappings' should be true by
default on this branch. Its the whole reason for this branch.
We can discuss making 'hibernate .test.validatefailureexpected' true by
default as well. The default has actually been false from the very
beginning of me developing that code. But that was years ago. I do not
remember the specific whys anymore.
--
steve at hibernate.org
http://hibernate.org
More information about the hibernate-dev
mailing list