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 18
18
import org .hibernate .testing .orm .domain .contacts .ContactsDomainModel ;
19
19
import org .hibernate .testing .orm .junit .BaseSessionFactoryFunctionalTest ;
20
20
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 ;
23
23
import org .junit .jupiter .api .Test ;
24
24
25
25
import jakarta .persistence .Entity ;
@@ -41,7 +41,7 @@ protected void applyMetadataSources(MetadataSources metadataSources) {
41
41
metadataSources .addAnnotatedClass ( EntityWithNumericId .class );
42
42
}
43
43
44
- @ BeforeAll
44
+ @ BeforeEach
45
45
public void prepareData () {
46
46
inTransaction (
47
47
session -> {
@@ -116,12 +116,9 @@ void testMultiValuedBigDecimals() {
116
116
});
117
117
}
118
118
119
- @ AfterAll
119
+ @ AfterEach
120
120
public void cleanupData () {
121
- inTransaction ( session -> {
122
- session .createMutationQuery ( "delete Contact" ).executeUpdate ();
123
- session .createMutationQuery ( "delete EntityWithNumericId" ).executeUpdate ();
124
- } );
121
+ sessionFactoryScope ().getSessionFactory ().getSchemaManager ().truncate ();
125
122
}
126
123
127
124
@ Entity ( name = "EntityWithNumericId" )
You can’t perform that action at this time.
0 commit comments