Skip to content

Commit 7dfbecc

Browse files
committed
Add @ContextConfiguration(…) to integration tests with super classes.
Closes #2196
1 parent b8dbf74 commit 7dfbecc

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/AotJdbcRepositoryIntegrationTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.springframework.data.jdbc.testing.IntegrationTest;
3535
import org.springframework.data.jdbc.testing.TestClass;
3636
import org.springframework.data.repository.core.support.RepositoryComposition;
37+
import org.springframework.test.context.ContextConfiguration;
3738

3839
/**
3940
* Integration test for {@link DummyEntityRepository} using JavaConfig with mounted AOT-generated repository methods.
@@ -42,6 +43,7 @@
4243
* @author Christoph Strobl
4344
*/
4445
@IntegrationTest
46+
@ContextConfiguration(classes = AotJdbcRepositoryIntegrationTests.AotConfig.class)
4547
@EnabledOnDatabase(DatabaseType.H2)
4648
class AotJdbcRepositoryIntegrationTests extends JdbcRepositoryIntegrationTests {
4749

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateIfNotFoundLookUpStrategyTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.springframework.data.jdbc.testing.TestClass;
2727
import org.springframework.data.jdbc.testing.TestConfiguration;
2828
import org.springframework.data.repository.query.QueryLookupStrategy;
29+
import org.springframework.test.context.ContextConfiguration;
2930

3031
/**
3132
* Test to verify that
@@ -36,6 +37,7 @@
3637
* @author Jens Schauder
3738
*/
3839
@IntegrationTest
40+
@ContextConfiguration(classes = JdbcRepositoryCreateIfNotFoundLookUpStrategyTests.Config.class)
3941
class JdbcRepositoryCreateIfNotFoundLookUpStrategyTests extends AbstractJdbcRepositoryLookUpStrategyTests {
4042

4143
@Test // GH-1043

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateLookUpStrategyTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package org.springframework.data.jdbc.repository;
1717

1818
import org.junit.jupiter.api.Test;
19+
1920
import org.springframework.context.annotation.Bean;
2021
import org.springframework.context.annotation.ComponentScan;
2122
import org.springframework.context.annotation.Configuration;
@@ -26,6 +27,7 @@
2627
import org.springframework.data.jdbc.testing.TestClass;
2728
import org.springframework.data.jdbc.testing.TestConfiguration;
2829
import org.springframework.data.repository.query.QueryLookupStrategy;
30+
import org.springframework.test.context.ContextConfiguration;
2931

3032
/**
3133
* Test to verify that <code>@EnableJdbcRepositories(queryLookupStrategy = QueryLookupStrategy.Key.CREATE)</code> works
@@ -35,6 +37,7 @@
3537
* @author Jens Schauder
3638
*/
3739
@IntegrationTest
40+
@ContextConfiguration(classes = JdbcRepositoryCreateLookUpStrategyTests.Config.class)
3841
class JdbcRepositoryCreateLookUpStrategyTests extends AbstractJdbcRepositoryLookUpStrategyTests {
3942

4043
@Test // GH-1043

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryDeclaredLookUpStrategyTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import org.springframework.data.jdbc.testing.TestClass;
1414
import org.springframework.data.jdbc.testing.TestConfiguration;
1515
import org.springframework.data.repository.query.QueryLookupStrategy;
16+
import org.springframework.test.context.ContextConfiguration;
1617

1718
/**
1819
* Test to verify that
@@ -21,6 +22,7 @@
2122
*
2223
* @author Diego Krupitza
2324
*/
25+
@ContextConfiguration(classes = JdbcRepositoryDeclaredLookUpStrategyTests.Config.class)
2426
class JdbcRepositoryDeclaredLookUpStrategyTests extends AbstractJdbcRepositoryLookUpStrategyTests {
2527

2628
@Test // GH-1043

0 commit comments

Comments
 (0)