File tree Expand file tree Collapse file tree 6 files changed +30
-29
lines changed
hibernate-core/src/test/java/org/hibernate/orm/test/query/hql Expand file tree Collapse file tree 6 files changed +30
-29
lines changed Original file line number Diff line number Diff line change 1515import org .hibernate .testing .orm .junit .ServiceRegistry ;
1616import org .hibernate .testing .orm .junit .SessionFactory ;
1717import org .hibernate .testing .orm .junit .SessionFactoryScope ;
18- import org .junit .jupiter .api .AfterEach ;
18+ import org .junit .jupiter .api .AfterAll ;
1919import org .junit .jupiter .api .Assertions ;
20- import org .junit .jupiter .api .BeforeEach ;
20+ import org .junit .jupiter .api .BeforeAll ;
2121import org .junit .jupiter .api .Test ;
2222
2323import static org .junit .jupiter .api .Assertions .assertEquals ;
3232@ SessionFactory
3333public class AggregateFilterClauseTest {
3434
35- @ BeforeEach
35+ @ BeforeAll
3636 public void prepareData (SessionFactoryScope scope ) {
3737 scope .inTransaction (
3838 em -> {
@@ -83,9 +83,9 @@ public void prepareData(SessionFactoryScope scope) {
8383 );
8484 }
8585
86- @ AfterEach
86+ @ AfterAll
8787 public void tearDown (SessionFactoryScope scope ) {
88- scope .getSessionFactory (). getSchemaManager (). truncate ();
88+ scope .dropData ();
8989 }
9090
9191 @ Test
Original file line number Diff line number Diff line change 4545import org .hibernate .testing .orm .junit .SessionFactory ;
4646import org .hibernate .testing .orm .junit .SessionFactoryScope ;
4747import org .hibernate .testing .orm .junit .SkipForDialect ;
48- import org .junit .jupiter .api .AfterEach ;
49- import org .junit .jupiter .api .BeforeEach ;
48+ import org .junit .jupiter .api .AfterAll ;
49+ import org .junit .jupiter .api .BeforeAll ;
5050import org .junit .jupiter .api .Test ;
5151
5252import java .math .BigDecimal ;
@@ -92,7 +92,8 @@ public class FunctionTests {
9292
9393 public static final double ERROR = 0.00001d ;
9494
95- @ BeforeEach @ SuppressWarnings ("deprecation" )
95+ @ BeforeAll
96+ @ SuppressWarnings ("deprecation" )
9697 public void prepareData (SessionFactoryScope scope ) {
9798 scope .inTransaction (
9899 em -> {
@@ -129,7 +130,7 @@ public void prepareData(SessionFactoryScope scope) {
129130 );
130131 }
131132
132- @ AfterEach
133+ @ AfterAll
133134 public void dropTestData (SessionFactoryScope scope ) {
134135 scope .dropData ();
135136 }
Original file line number Diff line number Diff line change 1919import org .hibernate .testing .orm .junit .SessionFactory ;
2020import org .hibernate .testing .orm .junit .SessionFactoryScope ;
2121import org .hibernate .testing .orm .junit .Setting ;
22- import org .junit .jupiter .api .AfterEach ;
23- import org .junit .jupiter .api .BeforeEach ;
22+ import org .junit .jupiter .api .AfterAll ;
23+ import org .junit .jupiter .api .BeforeAll ;
2424import org .junit .jupiter .api .Test ;
2525
2626import static org .junit .jupiter .api .Assertions .assertEquals ;
3535@ ServiceRegistry (settings = @ Setting (name = AvailableSettings .CRITERIA_COPY_TREE , value = "true" ))
3636public class ILikeCriteriaTest {
3737
38- @ BeforeEach
38+ @ BeforeAll
3939 public void prepareData (SessionFactoryScope scope ) {
4040 scope .inTransaction (
4141 em -> {
@@ -61,9 +61,9 @@ public void prepareData(SessionFactoryScope scope) {
6161 );
6262 }
6363
64- @ AfterEach
64+ @ AfterAll
6565 public void tearDown (SessionFactoryScope scope ) {
66- scope .getSessionFactory (). getSchemaManager (). truncate ();
66+ scope .dropData ();
6767 }
6868
6969 @ Test
Original file line number Diff line number Diff line change 1515import org .hibernate .testing .orm .junit .SessionFactory ;
1616import org .hibernate .testing .orm .junit .SessionFactoryScope ;
1717
18- import org .junit .jupiter .api .AfterEach ;
19- import org .junit .jupiter .api .BeforeEach ;
18+ import org .junit .jupiter .api .AfterAll ;
19+ import org .junit .jupiter .api .BeforeAll ;
2020import org .junit .jupiter .api .Test ;
2121
2222import static org .junit .jupiter .api .Assertions .assertEquals ;
3131@ SessionFactory
3232public class ILikeTest {
3333
34- @ BeforeEach
34+ @ BeforeAll
3535 public void prepareData (SessionFactoryScope scope ) {
3636 scope .inTransaction (
3737 em -> {
@@ -57,9 +57,9 @@ public void prepareData(SessionFactoryScope scope) {
5757 );
5858 }
5959
60- @ AfterEach
60+ @ AfterAll
6161 public void tearDown (SessionFactoryScope scope ) {
62- scope .getSessionFactory (). getSchemaManager (). truncate ();
62+ scope .dropData ();
6363 }
6464
6565 @ Test
Original file line number Diff line number Diff line change 3939import org .hibernate .testing .orm .junit .SessionFactoryScope ;
4040import org .hibernate .testing .orm .junit .Setting ;
4141import org .hibernate .testing .orm .junit .SkipForDialect ;
42- import org .junit .jupiter .api .AfterEach ;
43- import org .junit .jupiter .api .BeforeEach ;
42+ import org .junit .jupiter .api .AfterAll ;
43+ import org .junit .jupiter .api .BeforeAll ;
4444import org .junit .jupiter .api .Test ;
4545
4646import com .fasterxml .jackson .core .JsonProcessingException ;
@@ -77,7 +77,7 @@ public class JsonFunctionTests {
7777
7878 JsonHolder entity ;
7979
80- @ BeforeEach
80+ @ BeforeAll
8181 public void prepareData (SessionFactoryScope scope ) {
8282 scope .inTransaction (
8383 em -> {
@@ -117,9 +117,9 @@ public void prepareData(SessionFactoryScope scope) {
117117 );
118118 }
119119
120- @ AfterEach
120+ @ AfterAll
121121 public void cleanupData (SessionFactoryScope scope ) {
122- scope .getSessionFactory (). getSchemaManager (). truncate ();
122+ scope .dropData ();
123123 }
124124
125125 @ Test
Original file line number Diff line number Diff line change 2626import org .hibernate .testing .orm .junit .SessionFactory ;
2727import org .hibernate .testing .orm .junit .SessionFactoryScope ;
2828import org .hibernate .testing .orm .junit .SkipForDialect ;
29- import org .junit .jupiter .api .AfterEach ;
30- import org .junit .jupiter .api .BeforeEach ;
29+ import org .junit .jupiter .api .AfterAll ;
30+ import org .junit .jupiter .api .BeforeAll ;
3131import org .junit .jupiter .api .Test ;
3232
3333import static org .hamcrest .CoreMatchers .anyOf ;
4747@ SessionFactory
4848public class StandardFunctionTests {
4949
50- @ BeforeEach
50+ @ BeforeAll
5151 public void prepareData (SessionFactoryScope scope ) {
5252 scope .inTransaction (
5353 em -> {
@@ -62,9 +62,9 @@ public void prepareData(SessionFactoryScope scope) {
6262 );
6363 }
6464
65- @ AfterEach
65+ @ AfterAll
6666 public void truncateDate (SessionFactoryScope scope ) {
67- scope .getSessionFactory (). getSchemaManager (). truncate ();
67+ scope .dropData ();
6868 }
6969
7070 @ Test
You can’t perform that action at this time.
0 commit comments