|
19 | 19 | import static java.util.Collections.*; |
20 | 20 | import static org.assertj.core.api.Assertions.*; |
21 | 21 | import static org.assertj.core.api.SoftAssertions.*; |
| 22 | +import static org.springframework.data.jdbc.testing.TestConfiguration.*; |
22 | 23 | import static org.springframework.data.jdbc.testing.TestDatabaseFeatures.Feature.*; |
23 | 24 | import static org.springframework.test.context.TestExecutionListeners.MergeMode.*; |
24 | 25 |
|
|
36 | 37 | import java.util.stream.IntStream; |
37 | 38 |
|
38 | 39 | import org.assertj.core.api.SoftAssertions; |
39 | | -import org.junit.jupiter.api.BeforeEach; |
40 | 40 | import org.junit.jupiter.api.Test; |
41 | 41 | import org.junit.jupiter.api.extension.ExtendWith; |
42 | 42 | import org.springframework.beans.factory.annotation.Autowired; |
|
67 | 67 | import org.springframework.data.relational.core.mapping.RelationalMappingContext; |
68 | 68 | import org.springframework.data.relational.core.mapping.Table; |
69 | 69 | import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations; |
| 70 | +import org.springframework.test.context.ActiveProfiles; |
70 | 71 | import org.springframework.test.context.ContextConfiguration; |
71 | 72 | import org.springframework.test.context.TestExecutionListeners; |
72 | 73 | import org.springframework.test.context.junit.jupiter.SpringExtension; |
@@ -99,13 +100,6 @@ abstract class AbstractJdbcAggregateTemplateIntegrationTests { |
99 | 100 |
|
100 | 101 | LegoSet legoSet = createLegoSet("Star Destroyer"); |
101 | 102 |
|
102 | | - @BeforeEach |
103 | | - void beforeEach(){ |
104 | | - mappingContext.setSingleQueryLoadingEnabled(useSingleQuery()); |
105 | | - } |
106 | | - |
107 | | - abstract boolean useSingleQuery(); |
108 | | - |
109 | 103 | /** |
110 | 104 | * creates an instance of {@link NoIdListChain4} with the following properties: |
111 | 105 | * <ul> |
@@ -1879,16 +1873,10 @@ JdbcAggregateOperations operations(ApplicationEventPublisher publisher, Relation |
1879 | 1873 | } |
1880 | 1874 | } |
1881 | 1875 |
|
1882 | | - static class JdbcAggregateTemplateIntegrationTests extends AbstractJdbcAggregateTemplateIntegrationTests { |
1883 | | - @Override |
1884 | | - boolean useSingleQuery() { |
1885 | | - return false; |
1886 | | - } |
1887 | | - } |
1888 | | - static class JdbcAggregateTemplateSqlIntegrationTests extends AbstractJdbcAggregateTemplateIntegrationTests { |
1889 | | - @Override |
1890 | | - boolean useSingleQuery() { |
1891 | | - return true; |
1892 | | - } |
| 1876 | + static class JdbcAggregateTemplateIntegrationTests extends AbstractJdbcAggregateTemplateIntegrationTests { } |
| 1877 | + |
| 1878 | + @ActiveProfiles(PROFILE_SINGLE_QUERY_LOADING) |
| 1879 | + static class JdbcAggregateTemplateSingleQueryLoadingIntegrationTests extends AbstractJdbcAggregateTemplateIntegrationTests { |
| 1880 | + |
1893 | 1881 | } |
1894 | 1882 | } |
0 commit comments