File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
hibernate-core/src/test/java/org/hibernate/orm/test/query/hql Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 1818import org .hibernate .testing .orm .domain .contacts .ContactsDomainModel ;
1919import org .hibernate .testing .orm .junit .BaseSessionFactoryFunctionalTest ;
2020import 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 ;
2323import org .junit .jupiter .api .Test ;
2424
2525import 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" )
You can’t perform that action at this time.
0 commit comments