Skip to content

Commit f8c919d

Browse files
committed
improve test
1 parent d091b2f commit f8c919d

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/MultiValuedParameterTest.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
import org.hibernate.testing.orm.domain.contacts.ContactsDomainModel;
1919
import org.hibernate.testing.orm.junit.BaseSessionFactoryFunctionalTest;
2020
import org.hibernate.testing.orm.junit.Jira;
21-
import org.junit.jupiter.api.AfterAll;
22-
import org.junit.jupiter.api.BeforeAll;
21+
import org.junit.jupiter.api.AfterEach;
22+
import org.junit.jupiter.api.BeforeEach;
2323
import org.junit.jupiter.api.Test;
2424

2525
import jakarta.persistence.Entity;
@@ -41,7 +41,7 @@ protected void applyMetadataSources(MetadataSources metadataSources) {
4141
metadataSources.addAnnotatedClass( EntityWithNumericId.class );
4242
}
4343

44-
@BeforeAll
44+
@BeforeEach
4545
public void prepareData() {
4646
inTransaction(
4747
session -> {
@@ -116,12 +116,9 @@ void testMultiValuedBigDecimals() {
116116
});
117117
}
118118

119-
@AfterAll
119+
@AfterEach
120120
public void cleanupData() {
121-
inTransaction( session -> {
122-
session.createMutationQuery( "delete Contact" ).executeUpdate();
123-
session.createMutationQuery( "delete EntityWithNumericId" ).executeUpdate();
124-
} );
121+
sessionFactoryScope().getSessionFactory().getSchemaManager().truncate();
125122
}
126123

127124
@Entity( name = "EntityWithNumericId" )

0 commit comments

Comments
 (0)