From 4a1a084def508dc10e9dc5bcf9512d73e4b64bdf Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Mon, 8 Mar 2021 15:20:02 +0100 Subject: [PATCH] Fix StaticMetadataTest --- .../hibernate/orm/test/jpa/metadata/StaticMetadataTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metadata/StaticMetadataTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metadata/StaticMetadataTest.java index 1f24568277..e192c5de3b 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metadata/StaticMetadataTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metadata/StaticMetadataTest.java @@ -13,6 +13,7 @@ import javax.persistence.metamodel.EmbeddableType; import javax.persistence.metamodel.PluralAttribute; import javax.persistence.metamodel.Type; +import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; import org.hibernate.testing.orm.junit.Jpa; import org.junit.jupiter.api.Test; @@ -42,7 +43,10 @@ import static org.junit.jupiter.api.Assertions.assertTrue; public class StaticMetadataTest { @Test - public void testInjections() { + public void testInjections(EntityManagerFactoryScope scope) { + // Make sure the entity manager factory is properly initialized + scope.getEntityManagerFactory(); + // Address (embeddable) assertNotNull( Address_.address1 ); assertNotNull( Address_.address2 );