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 15
15
import org .hibernate .testing .orm .junit .ServiceRegistry ;
16
16
import org .hibernate .testing .orm .junit .SessionFactory ;
17
17
import org .hibernate .testing .orm .junit .SessionFactoryScope ;
18
- import org .junit .jupiter .api .AfterEach ;
18
+ import org .junit .jupiter .api .AfterAll ;
19
19
import org .junit .jupiter .api .Assertions ;
20
- import org .junit .jupiter .api .BeforeEach ;
20
+ import org .junit .jupiter .api .BeforeAll ;
21
21
import org .junit .jupiter .api .Test ;
22
22
23
23
import static org .junit .jupiter .api .Assertions .assertEquals ;
32
32
@ SessionFactory
33
33
public class AggregateFilterClauseTest {
34
34
35
- @ BeforeEach
35
+ @ BeforeAll
36
36
public void prepareData (SessionFactoryScope scope ) {
37
37
scope .inTransaction (
38
38
em -> {
@@ -83,9 +83,9 @@ public void prepareData(SessionFactoryScope scope) {
83
83
);
84
84
}
85
85
86
- @ AfterEach
86
+ @ AfterAll
87
87
public void tearDown (SessionFactoryScope scope ) {
88
- scope .getSessionFactory (). getSchemaManager (). truncate ();
88
+ scope .dropData ();
89
89
}
90
90
91
91
@ Test
Original file line number Diff line number Diff line change 45
45
import org .hibernate .testing .orm .junit .SessionFactory ;
46
46
import org .hibernate .testing .orm .junit .SessionFactoryScope ;
47
47
import 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 ;
50
50
import org .junit .jupiter .api .Test ;
51
51
52
52
import java .math .BigDecimal ;
@@ -92,7 +92,8 @@ public class FunctionTests {
92
92
93
93
public static final double ERROR = 0.00001d ;
94
94
95
- @ BeforeEach @ SuppressWarnings ("deprecation" )
95
+ @ BeforeAll
96
+ @ SuppressWarnings ("deprecation" )
96
97
public void prepareData (SessionFactoryScope scope ) {
97
98
scope .inTransaction (
98
99
em -> {
@@ -129,7 +130,7 @@ public void prepareData(SessionFactoryScope scope) {
129
130
);
130
131
}
131
132
132
- @ AfterEach
133
+ @ AfterAll
133
134
public void dropTestData (SessionFactoryScope scope ) {
134
135
scope .dropData ();
135
136
}
Original file line number Diff line number Diff line change 19
19
import org .hibernate .testing .orm .junit .SessionFactory ;
20
20
import org .hibernate .testing .orm .junit .SessionFactoryScope ;
21
21
import 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 ;
24
24
import org .junit .jupiter .api .Test ;
25
25
26
26
import static org .junit .jupiter .api .Assertions .assertEquals ;
35
35
@ ServiceRegistry (settings = @ Setting (name = AvailableSettings .CRITERIA_COPY_TREE , value = "true" ))
36
36
public class ILikeCriteriaTest {
37
37
38
- @ BeforeEach
38
+ @ BeforeAll
39
39
public void prepareData (SessionFactoryScope scope ) {
40
40
scope .inTransaction (
41
41
em -> {
@@ -61,9 +61,9 @@ public void prepareData(SessionFactoryScope scope) {
61
61
);
62
62
}
63
63
64
- @ AfterEach
64
+ @ AfterAll
65
65
public void tearDown (SessionFactoryScope scope ) {
66
- scope .getSessionFactory (). getSchemaManager (). truncate ();
66
+ scope .dropData ();
67
67
}
68
68
69
69
@ Test
Original file line number Diff line number Diff line change 15
15
import org .hibernate .testing .orm .junit .SessionFactory ;
16
16
import org .hibernate .testing .orm .junit .SessionFactoryScope ;
17
17
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 ;
20
20
import org .junit .jupiter .api .Test ;
21
21
22
22
import static org .junit .jupiter .api .Assertions .assertEquals ;
31
31
@ SessionFactory
32
32
public class ILikeTest {
33
33
34
- @ BeforeEach
34
+ @ BeforeAll
35
35
public void prepareData (SessionFactoryScope scope ) {
36
36
scope .inTransaction (
37
37
em -> {
@@ -57,9 +57,9 @@ public void prepareData(SessionFactoryScope scope) {
57
57
);
58
58
}
59
59
60
- @ AfterEach
60
+ @ AfterAll
61
61
public void tearDown (SessionFactoryScope scope ) {
62
- scope .getSessionFactory (). getSchemaManager (). truncate ();
62
+ scope .dropData ();
63
63
}
64
64
65
65
@ Test
Original file line number Diff line number Diff line change 39
39
import org .hibernate .testing .orm .junit .SessionFactoryScope ;
40
40
import org .hibernate .testing .orm .junit .Setting ;
41
41
import 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 ;
44
44
import org .junit .jupiter .api .Test ;
45
45
46
46
import com .fasterxml .jackson .core .JsonProcessingException ;
@@ -77,7 +77,7 @@ public class JsonFunctionTests {
77
77
78
78
JsonHolder entity ;
79
79
80
- @ BeforeEach
80
+ @ BeforeAll
81
81
public void prepareData (SessionFactoryScope scope ) {
82
82
scope .inTransaction (
83
83
em -> {
@@ -117,9 +117,9 @@ public void prepareData(SessionFactoryScope scope) {
117
117
);
118
118
}
119
119
120
- @ AfterEach
120
+ @ AfterAll
121
121
public void cleanupData (SessionFactoryScope scope ) {
122
- scope .getSessionFactory (). getSchemaManager (). truncate ();
122
+ scope .dropData ();
123
123
}
124
124
125
125
@ Test
Original file line number Diff line number Diff line change 26
26
import org .hibernate .testing .orm .junit .SessionFactory ;
27
27
import org .hibernate .testing .orm .junit .SessionFactoryScope ;
28
28
import 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 ;
31
31
import org .junit .jupiter .api .Test ;
32
32
33
33
import static org .hamcrest .CoreMatchers .anyOf ;
47
47
@ SessionFactory
48
48
public class StandardFunctionTests {
49
49
50
- @ BeforeEach
50
+ @ BeforeAll
51
51
public void prepareData (SessionFactoryScope scope ) {
52
52
scope .inTransaction (
53
53
em -> {
@@ -62,9 +62,9 @@ public void prepareData(SessionFactoryScope scope) {
62
62
);
63
63
}
64
64
65
- @ AfterEach
65
+ @ AfterAll
66
66
public void truncateDate (SessionFactoryScope scope ) {
67
- scope .getSessionFactory (). getSchemaManager (). truncate ();
67
+ scope .dropData ();
68
68
}
69
69
70
70
@ Test
You can’t perform that action at this time.
0 commit comments