diff --git a/hibernate-core/src/test/java/org/hibernate/test/events/CallbackTest.java b/hibernate-core/src/test/java/org/hibernate/test/events/CallbackTest.java index 0d13e5d33c..94e1f4f030 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/events/CallbackTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/events/CallbackTest.java @@ -40,7 +40,6 @@ import org.hibernate.event.spi.EventType; import org.hibernate.integrator.spi.Integrator; import org.hibernate.metamodel.spi.MetadataImplementor; import org.hibernate.service.spi.SessionFactoryServiceRegistry; -import org.hibernate.testing.FailureExpectedWithNewMetamodel; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import static org.junit.Assert.assertEquals; @@ -101,7 +100,6 @@ public class CallbackTest extends BaseCoreFunctionalTestCase { } @Test - @FailureExpectedWithNewMetamodel public void testCallbacks() { assertEquals( "observer not notified of creation", 1, observer.creationCount ); assertEquals( "listener not notified of creation", 1, listener.initCount ); diff --git a/hibernate-core/src/test/resources/hibernate.properties b/hibernate-core/src/test/resources/hibernate.properties index cae1c6c221..9f6aad34eb 100644 --- a/hibernate-core/src/test/resources/hibernate.properties +++ b/hibernate-core/src/test/resources/hibernate.properties @@ -30,7 +30,6 @@ hibernate.connection.pool_size 5 hibernate.show_sql false hibernate.format_sql true - hibernate.max_fetch_depth 5 hibernate.cache.region_prefix hibernate.test diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java b/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java index 9c121113a9..6faebdb220 100644 --- a/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java @@ -191,6 +191,9 @@ public abstract class BaseCoreFunctionalTestCase extends BaseUnitTestCase { if ( configuration.getEntityNotFoundDelegate() != null ) { sessionFactoryBuilder.with( configuration.getEntityNotFoundDelegate() ); } + if ( configuration.getSessionFactoryObserver() != null ){ + sessionFactoryBuilder.add( configuration.getSessionFactoryObserver() ); + } } protected void rebuildSessionFactory() {