From 325d9cc89cce716ef8adfb319dc3e2ceb0a9cd94 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Mon, 7 Mar 2022 14:26:22 +0100 Subject: [PATCH] Polishing. Run tests only for a single database since it is actually not testing anything database related. Formatting. Original pull request #1187 See #1043 --- .../config/EnableJdbcRepositories.java | 2 ++ .../support/JdbcQueryLookupStrategy.java | 35 ++++++++----------- ...actJdbcRepositoryLookUpStrategyTests.java} | 12 ++++--- ...yCreateIfNotFoundLookUpStrategyTests.java} | 19 +++++----- ...cRepositoryCreateLookUpStrategyTests.java} | 15 ++++---- ...epositoryDeclaredLookUpStrategyTests.java} | 16 ++++----- .../JdbcQueryLookupStrategyUnitTests.java | 3 +- ...toryLookUpStrategyIntegrationTests-db2.sql | 7 ---- ...itoryLookUpStrategyIntegrationTests-h2.sql | 5 --- ...LookUpStrategyIntegrationTests-mariadb.sql | 5 --- ...ryLookUpStrategyIntegrationTests-mssql.sql | 7 ---- ...ryLookUpStrategyIntegrationTests-mysql.sql | 5 --- ...yLookUpStrategyIntegrationTests-oracle.sql | 7 ---- ...ookUpStrategyIntegrationTests-postgres.sql | 6 ---- ...dbcRepositoryLookUpStrategyTests-hsql.sql} | 0 15 files changed, 48 insertions(+), 96 deletions(-) rename spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/{AbstractJdbcRepositoryLookUpStrategyIntegrationTests.java => AbstractJdbcRepositoryLookUpStrategyTests.java} (89%) rename spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/{JdbcRepositoryCreateIfNotFoundLookUpStrategyIntegrationTests.java => JdbcRepositoryCreateIfNotFoundLookUpStrategyTests.java} (81%) rename spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/{JdbcRepositoryCreateLookUpStrategyIntegrationTests.java => JdbcRepositoryCreateLookUpStrategyTests.java} (84%) rename spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/{JdbcRepositoryDeclaredLookUpStrategyIntegrationTests.java => JdbcRepositoryDeclaredLookUpStrategyTests.java} (76%) delete mode 100644 spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-db2.sql delete mode 100644 spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-h2.sql delete mode 100644 spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mariadb.sql delete mode 100644 spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mssql.sql delete mode 100644 spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mysql.sql delete mode 100644 spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-oracle.sql delete mode 100644 spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-postgres.sql rename spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/{AbstractJdbcRepositoryLookUpStrategyIntegrationTests-hsql.sql => AbstractJdbcRepositoryLookUpStrategyTests-hsql.sql} (100%) diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/EnableJdbcRepositories.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/EnableJdbcRepositories.java index c5e169450..10752cc8d 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/EnableJdbcRepositories.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/config/EnableJdbcRepositories.java @@ -136,6 +136,8 @@ public @interface EnableJdbcRepositories { /** * Returns the key of the {@link QueryLookupStrategy} to be used for lookup queries for query methods. Defaults to * {@link QueryLookupStrategy.Key#CREATE_IF_NOT_FOUND}. + * + * @since 2.1 */ QueryLookupStrategy.Key queryLookupStrategy() default QueryLookupStrategy.Key.CREATE_IF_NOT_FOUND; } diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategy.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategy.java index 4fbdd69f8..a854b99c3 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategy.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategy.java @@ -99,6 +99,7 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy { * {@link QueryLookupStrategy} to create a query from the method name. * * @author Diego Krupitza + * @since 2.4 */ static class CreateQueryLookupStrategy extends JdbcQueryLookupStrategy { @@ -125,6 +126,7 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy { * {@link org.springframework.data.jdbc.repository.query.Query} annotation followed by a JPA named query lookup. * * @author Diego Krupitza + * @since 2.4 */ static class DeclaredQueryLookupStrategy extends JdbcQueryLookupStrategy { @@ -150,7 +152,7 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy { StringBasedJdbcQuery query = new StringBasedJdbcQuery(queryMethod, getOperations(), this::createMapper, getConverter()); - query.setBeanFactory(getBeanfactory()); + query.setBeanFactory(getBeanFactory()); return query; } @@ -163,12 +165,9 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy { * {@link QueryLookupStrategy} to try to detect a declared query first ( * {@link org.springframework.data.jdbc.repository.query.Query}, JDBC named query). In case none is found we fall back * on query creation. - *

- * Modified based on original source: {@link org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy} * - * @author Oliver Gierke - * @author Thomas Darimont * @author Diego Krupitza + * @since 2.4 */ static class CreateIfNotFoundQueryLookupStrategy extends JdbcQueryLookupStrategy { @@ -181,7 +180,7 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy { * @param createStrategy must not be {@literal null}. * @param lookupStrategy must not be {@literal null}. */ - public CreateIfNotFoundQueryLookupStrategy(ApplicationEventPublisher publisher, @Nullable EntityCallbacks callbacks, + CreateIfNotFoundQueryLookupStrategy(ApplicationEventPublisher publisher, @Nullable EntityCallbacks callbacks, RelationalMappingContext context, JdbcConverter converter, Dialect dialect, QueryMappingConfiguration queryMappingConfiguration, NamedParameterJdbcOperations operations, @Nullable BeanFactory beanfactory, CreateQueryLookupStrategy createStrategy, @@ -228,12 +227,12 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy { * @param dialect must not be {@literal null} * @param queryMappingConfiguration must not be {@literal null} * @param operations must not be {@literal null} - * @param beanfactory may be {@literal null} + * @param beanFactory may be {@literal null} */ public static QueryLookupStrategy create(@Nullable Key key, ApplicationEventPublisher publisher, @Nullable EntityCallbacks callbacks, RelationalMappingContext context, JdbcConverter converter, Dialect dialect, QueryMappingConfiguration queryMappingConfiguration, NamedParameterJdbcOperations operations, - @Nullable BeanFactory beanfactory) { + @Nullable BeanFactory beanFactory) { Assert.notNull(publisher, "ApplicationEventPublisher must not be null"); Assert.notNull(context, "RelationalMappingContextPublisher must not be null"); @@ -243,10 +242,10 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy { Assert.notNull(operations, "NamedParameterJdbcOperations must not be null"); CreateQueryLookupStrategy createQueryLookupStrategy = new CreateQueryLookupStrategy(publisher, callbacks, context, - converter, dialect, queryMappingConfiguration, operations, beanfactory); + converter, dialect, queryMappingConfiguration, operations, beanFactory); DeclaredQueryLookupStrategy declaredQueryLookupStrategy = new DeclaredQueryLookupStrategy(publisher, callbacks, - context, converter, dialect, queryMappingConfiguration, operations, beanfactory); + context, converter, dialect, queryMappingConfiguration, operations, beanFactory); Key cleanedKey = key != null ? key : Key.CREATE_IF_NOT_FOUND; @@ -259,34 +258,30 @@ abstract class JdbcQueryLookupStrategy implements QueryLookupStrategy { return declaredQueryLookupStrategy; case CREATE_IF_NOT_FOUND: return new CreateIfNotFoundQueryLookupStrategy(publisher, callbacks, context, converter, dialect, - queryMappingConfiguration, operations, beanfactory, createQueryLookupStrategy, declaredQueryLookupStrategy); + queryMappingConfiguration, operations, beanFactory, createQueryLookupStrategy, declaredQueryLookupStrategy); default: throw new IllegalArgumentException(String.format("Unsupported query lookup strategy %s!", key)); } } - protected ApplicationEventPublisher getPublisher() { - return publisher; - } - - protected RelationalMappingContext getContext() { + RelationalMappingContext getContext() { return context; } - protected JdbcConverter getConverter() { + JdbcConverter getConverter() { return converter; } - protected Dialect getDialect() { + Dialect getDialect() { return dialect; } - protected NamedParameterJdbcOperations getOperations() { + NamedParameterJdbcOperations getOperations() { return operations; } @Nullable - protected BeanFactory getBeanfactory() { + BeanFactory getBeanFactory() { return beanfactory; } diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/AbstractJdbcRepositoryLookUpStrategyTests.java similarity index 89% rename from spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests.java rename to spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/AbstractJdbcRepositoryLookUpStrategyTests.java index 41e5646c9..8193b0c65 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/AbstractJdbcRepositoryLookUpStrategyTests.java @@ -29,18 +29,19 @@ import org.springframework.data.repository.CrudRepository; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; /** - * Base class to test @EnableJdbcRepositories(queryLookupStrategy = ...) Tests based on logic from - * {@link org.springframework.data.jdbc.repository.support.JdbcQueryLookupStrategy} + * Base class to test @EnableJdbcRepositories(queryLookupStrategy = ...) * * @author Diego Krupitza + * @since 2.4 */ -abstract class AbstractJdbcRepositoryLookUpStrategyIntegrationTests { +abstract class AbstractJdbcRepositoryLookUpStrategyTests { @Autowired protected OnesRepository onesRepository; @Autowired NamedParameterJdbcTemplate template; @Autowired RelationalMappingContext context; - protected void insertTestInstances() { + void insertTestInstances() { + AggregateOne firstAggregate = new AggregateOne("Diego"); AggregateOne secondAggregate = new AggregateOne("Franz"); AggregateOne thirdAggregate = new AggregateOne("Daniela"); @@ -48,7 +49,8 @@ abstract class AbstractJdbcRepositoryLookUpStrategyIntegrationTests { onesRepository.saveAll(Arrays.asList(firstAggregate, secondAggregate, thirdAggregate)); } - protected void callDeclaredQuery(String name, int expectedSize, String... expectedNames) { + void callDeclaredQuery(String name, int expectedSize, String... expectedNames) { + insertTestInstances(); List likeNameD = onesRepository.findAllByName(name); diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateIfNotFoundLookUpStrategyIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateIfNotFoundLookUpStrategyTests.java similarity index 81% rename from spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateIfNotFoundLookUpStrategyIntegrationTests.java rename to spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateIfNotFoundLookUpStrategyTests.java index f43521979..43f264b59 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateIfNotFoundLookUpStrategyIntegrationTests.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateIfNotFoundLookUpStrategyTests.java @@ -27,7 +27,6 @@ import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories; import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory; import org.springframework.data.jdbc.testing.TestConfiguration; import org.springframework.data.repository.query.QueryLookupStrategy; -import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.Transactional; @@ -35,25 +34,24 @@ import org.springframework.transaction.annotation.Transactional; /** * Test to verify that * @EnableJdbcRepositories(queryLookupStrategy = QueryLookupStrategy.Key.CREATE_IF_NOT_FOUND) works as - * intended. Tests based on logic from - * {@link org.springframework.data.jdbc.repository.support.JdbcQueryLookupStrategy.CreateIfNotFoundQueryLookupStrategy} + * intended. * * @author Diego Krupitza + * @author Jens Schauder */ @ContextConfiguration @Transactional -@ActiveProfiles("hsql") @ExtendWith(SpringExtension.class) -class JdbcRepositoryCreateIfNotFoundLookUpStrategyIntegrationTests - extends AbstractJdbcRepositoryLookUpStrategyIntegrationTests { +class JdbcRepositoryCreateIfNotFoundLookUpStrategyTests + extends AbstractJdbcRepositoryLookUpStrategyTests { - @Test + @Test // GH-1043 void declaredQueryShouldWork() { onesRepository.deleteAll(); callDeclaredQuery("D", 2, "Diego", "Daniela"); } - @Test + @Test // GH-1043 void derivedQueryShouldWork() { onesRepository.deleteAll(); callDerivedQuery(); @@ -64,7 +62,7 @@ class JdbcRepositoryCreateIfNotFoundLookUpStrategyIntegrationTests @EnableJdbcRepositories(considerNestedRepositories = true, queryLookupStrategy = QueryLookupStrategy.Key.CREATE_IF_NOT_FOUND, includeFilters = @ComponentScan.Filter( - value = AbstractJdbcRepositoryLookUpStrategyIntegrationTests.OnesRepository.class, + value = AbstractJdbcRepositoryLookUpStrategyTests.OnesRepository.class, type = FilterType.ASSIGNABLE_TYPE)) static class Config { @@ -72,8 +70,7 @@ class JdbcRepositoryCreateIfNotFoundLookUpStrategyIntegrationTests @Bean Class testClass() { - return AbstractJdbcRepositoryLookUpStrategyIntegrationTests.class; + return AbstractJdbcRepositoryLookUpStrategyTests.class; } } - } diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateLookUpStrategyIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateLookUpStrategyTests.java similarity index 84% rename from spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateLookUpStrategyIntegrationTests.java rename to spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateLookUpStrategyTests.java index 59371955e..77d7f8109 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateLookUpStrategyIntegrationTests.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryCreateLookUpStrategyTests.java @@ -34,26 +34,25 @@ import org.springframework.transaction.annotation.Transactional; /** * Test to verify that @EnableJdbcRepositories(queryLookupStrategy = QueryLookupStrategy.Key.CREATE) works - * as intended. Tests based on logic from - * {@link org.springframework.data.jdbc.repository.support.JdbcQueryLookupStrategy.CreateQueryLookupStrategy} + * as intended. * * @author Diego Krupitza + * @author Jens Schauder */ @ContextConfiguration @Transactional -@ActiveProfiles("hsql") @ExtendWith(SpringExtension.class) -class JdbcRepositoryCreateLookUpStrategyIntegrationTests extends AbstractJdbcRepositoryLookUpStrategyIntegrationTests { +class JdbcRepositoryCreateLookUpStrategyTests extends AbstractJdbcRepositoryLookUpStrategyTests { - @Test + @Test // GH-1043 void declaredQueryShouldWork() { onesRepository.deleteAll(); - // here the declared query will use the dervice query which does something totally different + // here the declared query will use the derived query which does something totally different callDeclaredQuery("D", 0); } - @Test + @Test // GH-1043 void derivedQueryShouldWork() { onesRepository.deleteAll(); callDerivedQuery(); @@ -69,7 +68,7 @@ class JdbcRepositoryCreateLookUpStrategyIntegrationTests extends AbstractJdbcRep @Bean Class testClass() { - return AbstractJdbcRepositoryLookUpStrategyIntegrationTests.class; + return AbstractJdbcRepositoryLookUpStrategyTests.class; } } diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryDeclaredLookUpStrategyIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryDeclaredLookUpStrategyTests.java similarity index 76% rename from spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryDeclaredLookUpStrategyIntegrationTests.java rename to spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryDeclaredLookUpStrategyTests.java index 40fd53eb6..83ac2f97a 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryDeclaredLookUpStrategyIntegrationTests.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryDeclaredLookUpStrategyTests.java @@ -18,20 +18,19 @@ import org.springframework.data.repository.query.QueryLookupStrategy; /** * Test to verify that * @EnableJdbcRepositories(queryLookupStrategy = QueryLookupStrategy.Key.USE_DECLARED_QUERY) works as - * intended. Tests based on logic from - * {@link org.springframework.data.jdbc.repository.support.JdbcQueryLookupStrategy.DeclaredQueryLookupStrategy} + * intended. * * @author Diego Krupitza */ -class JdbcRepositoryDeclaredLookUpStrategyIntegrationTests - extends AbstractJdbcRepositoryLookUpStrategyIntegrationTests { +class JdbcRepositoryDeclaredLookUpStrategyTests + extends AbstractJdbcRepositoryLookUpStrategyTests { - @Test + @Test // GH-1043 void contextCannotByCreatedDueToFindByNameNotDeclaredQuery() { try (AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext()) { - context.register(JdbcRepositoryDeclaredLookUpStrategyIntegrationTests.Config.class); + context.register(JdbcRepositoryDeclaredLookUpStrategyTests.Config.class); assertThatThrownBy(() -> { context.refresh(); @@ -45,7 +44,7 @@ class JdbcRepositoryDeclaredLookUpStrategyIntegrationTests @EnableJdbcRepositories(considerNestedRepositories = true, queryLookupStrategy = QueryLookupStrategy.Key.USE_DECLARED_QUERY, includeFilters = @ComponentScan.Filter( - value = AbstractJdbcRepositoryLookUpStrategyIntegrationTests.OnesRepository.class, + value = AbstractJdbcRepositoryLookUpStrategyTests.OnesRepository.class, type = FilterType.ASSIGNABLE_TYPE)) static class Config { @@ -53,8 +52,7 @@ class JdbcRepositoryDeclaredLookUpStrategyIntegrationTests @Bean Class testClass() { - return AbstractJdbcRepositoryLookUpStrategyIntegrationTests.class; + return AbstractJdbcRepositoryLookUpStrategyTests.class; } } - } diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategyUnitTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategyUnitTests.java index 4b2187c77..170c05200 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategyUnitTests.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/support/JdbcQueryLookupStrategyUnitTests.java @@ -111,7 +111,7 @@ class JdbcQueryLookupStrategyUnitTests { verify(operations).queryForObject(eq("some SQL"), any(SqlParameterSource.class), any(RowMapper.class)); } - @Test + @Test // GH-1043 void shouldFailOnMissingDeclaredQuery() { RowMapper numberFormatMapper = mock(RowMapper.class); @@ -139,6 +139,7 @@ class JdbcQueryLookupStrategyUnitTests { } private static Stream correctLookUpStrategyForKeySource() { + return Stream.of( // Arguments.of(QueryLookupStrategy.Key.CREATE_IF_NOT_FOUND, JdbcQueryLookupStrategy.CreateIfNotFoundQueryLookupStrategy.class), // diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-db2.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-db2.sql deleted file mode 100644 index 205dff68d..000000000 --- a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-db2.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP TABLE aggregate_one; - -CREATE TABLE aggregate_one -( - id BIGINT GENERATED BY DEFAULT AS IDENTITY ( START WITH 1 ) PRIMARY KEY, - NAME VARCHAR(100) -); diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-h2.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-h2.sql deleted file mode 100644 index 6ab837bf0..000000000 --- a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-h2.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE aggregate_one -( - id BIGINT GENERATED BY DEFAULT AS IDENTITY ( START WITH 1 ) PRIMARY KEY, - NAME VARCHAR(100) -); \ No newline at end of file diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mariadb.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mariadb.sql deleted file mode 100644 index 1e08bbef5..000000000 --- a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mariadb.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE aggregate_one -( - id BIGINT AUTO_INCREMENT PRIMARY KEY, - NAME VARCHAR(100) -); diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mssql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mssql.sql deleted file mode 100644 index e6eee1fd7..000000000 --- a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mssql.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP TABLE IF EXISTS aggregate_one; - -CREATE TABLE aggregate_one -( - id BIGINT IDENTITY PRIMARY KEY, - NAME VARCHAR(100) -); \ No newline at end of file diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mysql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mysql.sql deleted file mode 100644 index 53c5933b5..000000000 --- a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-mysql.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE aggregate_one -( - id BIGINT AUTO_INCREMENT PRIMARY KEY, - NAME VARCHAR(100) -); \ No newline at end of file diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-oracle.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-oracle.sql deleted file mode 100644 index d32bc3764..000000000 --- a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-oracle.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP TABLE aggregate_one CASCADE CONSTRAINTS PURGE; - -CREATE TABLE aggregate_one -( - id NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY PRIMARY KEY, - NAME VARCHAR2(100) -); diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-postgres.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-postgres.sql deleted file mode 100644 index c551f53fa..000000000 --- a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-postgres.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE aggregate_one; -CREATE TABLE aggregate_one -( - id SERIAL PRIMARY KEY, - NAME VARCHAR(100) -); \ No newline at end of file diff --git a/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-hsql.sql b/spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyTests-hsql.sql similarity index 100% rename from spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyIntegrationTests-hsql.sql rename to spring-data-jdbc/src/test/resources/org.springframework.data.jdbc.repository/AbstractJdbcRepositoryLookUpStrategyTests-hsql.sql