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

Hardy Ferentschik hardy at hibernate.org
Thu Aug 2 10:34:21 EDT 2012


On 2 Jan 2012, at 4:10 PM, John Verhaeg wrote:

> 
> On Aug 2, 2012, at 1:26 AM, Hardy Ferentschik wrote:
> 
>>> When hibernate.test.validatefailureexpected is false (the default), the result from FailureExpected tests is simply ignored.
>> 
>> :-(
> 
> Hardy, I'm assuming from your frown, you don't like this for some reason.  This is the expected behavior, and the main reason for having these annotations in the first place.

I am not  following. Why does it make sense to have this flag set to false? The reason for the annotations (@FailureExpectedWithNewMetamodel  and @FailureExpected) is to mark a test as expected to be failing. 
This means when I run the tests the annotated tests should throw an exception which in turn gets ignored as an overall test failure (the build completes nicely).

AFAIU, hibernate.test.validatefailureexpected  is there to take it to the next level. What happens if a test is annotated with a failure expected annotation and the failure does not happen. This would often indicate
that something directly or indirectly fixed the problem with the test in which case I would like to know about it by a failing test (the test was marked as failing, but it actually succeeded => failure).

How are we going to gradually remove the @FailureExpectedWithNewMetamodel annotations if there is no feedback when the tests are not failing anymore?

So unless I misunderstand the intend of hibernate.test.validatefailureexpected I think Gail is right and it should be the default. Also the new metamodel should be the default on the metamodel branch with the 
build completing successfully. This means all failing tests should be annotated w/ @FailureExpectedWithNewMetamodel. As we implement the missing functionality and fix bugs we keep removing them until
they are all gone. Now, this is what I thought @FailureExpectedWithNewMetamodel  was all about.

--Hardy




More information about the hibernate-dev mailing list