Skip to content

Commit e7a75af

Browse files
committed
improve StandardFunctionTests
1 parent 9319565 commit e7a75af

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
import org.hibernate.testing.orm.junit.SessionFactory;
2626
import org.hibernate.testing.orm.junit.SessionFactoryScope;
2727
import org.hibernate.testing.orm.junit.SkipForDialect;
28-
import org.junit.jupiter.api.BeforeAll;
28+
import org.junit.jupiter.api.AfterEach;
29+
import org.junit.jupiter.api.BeforeEach;
2930
import org.junit.jupiter.api.Test;
3031

3132
import static org.hamcrest.CoreMatchers.anyOf;
@@ -45,7 +46,7 @@
4546
@SessionFactory
4647
public class StandardFunctionTests {
4748

48-
@BeforeAll
49+
@BeforeEach
4950
public void prepareData(SessionFactoryScope scope) {
5051
scope.inTransaction(
5152
em -> {
@@ -60,6 +61,11 @@ public void prepareData(SessionFactoryScope scope) {
6061
);
6162
}
6263

64+
@AfterEach
65+
public void truncateDate(SessionFactoryScope scope) {
66+
scope.getSessionFactory().getSchemaManager().truncate();
67+
}
68+
6369
@Test
6470
public void currentTimestampTests(SessionFactoryScope scope) {
6571
scope.inTransaction(

0 commit comments

Comments
 (0)