Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-relational-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0-DATAJDBC-574-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Spring Data Relational Parent</name>
Expand Down Expand Up @@ -208,24 +208,24 @@
</systemPropertyVariables>
</configuration>
</execution>
<!--<execution>-->
<!--<id>mssql-test</id>-->
<!--<phase>test</phase>-->
<!--<goals>-->
<!--<goal>test</goal>-->
<!--</goals>-->
<!--<configuration>-->
<!--<includes>-->
<!--<include>**/*IntegrationTests.java</include>-->
<!--</includes>-->
<!--<excludes>-->
<!--<exclude>**/*HsqlIntegrationTests.java</exclude>-->
<!--</excludes>-->
<!--<systemPropertyVariables>-->
<!--<spring.profiles.active>mssql</spring.profiles.active>-->
<!--</systemPropertyVariables>-->
<!--</configuration>-->
<!--</execution>-->
<execution>
<id>mssql-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<includes>
<include>**/*IntegrationTests.java</include>
</includes>
<excludes>
<exclude>**/*HsqlIntegrationTests.java</exclude>
</excludes>
<systemPropertyVariables>
<spring.profiles.active>mssql</spring.profiles.active>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion spring-data-jdbc-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-relational-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0-DATAJDBC-574-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions spring-data-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>spring-data-jdbc</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0-DATAJDBC-574-SNAPSHOT</version>

<name>Spring Data JDBC</name>
<description>Spring Data module for JDBC repositories.</description>
Expand All @@ -15,7 +15,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-relational-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0-DATAJDBC-574-SNAPSHOT</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public void saveAndDeleteAllWithReferencedEntity() {
}

@Test // DATAJDBC-112
@EnabledOnFeature(SUPPORTS_QUOTED_IDS)
@EnabledOnFeature({SUPPORTS_QUOTED_IDS, SUPPORTS_GENERATED_IDS_IN_REFERENCED_ENTITIES})
public void updateReferencedEntityFromNull() {

legoSet.setManual(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.platform.commons.util.ExceptionUtils;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -47,6 +48,7 @@
import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.repository.CrudRepository;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
import org.springframework.transaction.PlatformTransactionManager;
Expand All @@ -58,6 +60,7 @@
* @author Myeonghyeon Lee
* @author Jens Schauder
*/
@RunWith(SpringRunner.class)
public class JdbcRepositoryConcurrencyIntegrationTests {

@Configuration
Expand All @@ -77,9 +80,6 @@ DummyEntityRepository dummyEntityRepository() {
}
}

@ClassRule public static final SpringClassRule classRule = new SpringClassRule();
@Rule public SpringMethodRule methodRule = new SpringMethodRule();

@Autowired NamedParameterJdbcTemplate template;
@Autowired DummyEntityRepository repository;
@Autowired PlatformTransactionManager transactionManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static org.assertj.core.api.Assertions.*;
import static org.springframework.data.jdbc.testing.TestDatabaseFeatures.Feature.*;
import static org.springframework.test.context.TestExecutionListeners.MergeMode.*;

import junit.framework.AssertionFailedError;
import lombok.Data;
Expand All @@ -29,17 +30,21 @@
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.annotation.Id;
import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;
import org.springframework.data.jdbc.testing.AssumeFeatureRule;
import org.springframework.data.jdbc.testing.EnabledOnFeature;
import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.repository.CrudRepository;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -52,11 +57,10 @@
*/
@ContextConfiguration
@Transactional
@TestExecutionListeners(value = AssumeFeatureRule.class, mergeMode = MERGE_WITH_DEFAULTS)
@RunWith(SpringRunner.class)
public class JdbcRepositoryWithCollectionsIntegrationTests {

@ClassRule public static final SpringClassRule classRule = new SpringClassRule();
@Rule public SpringMethodRule methodRule = new SpringMethodRule();

@Autowired NamedParameterJdbcTemplate template;
@Autowired DummyEntityRepository repository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static org.assertj.core.api.Assertions.*;
import static org.springframework.data.jdbc.testing.TestDatabaseFeatures.Feature.*;
import static org.springframework.test.context.TestExecutionListeners.MergeMode.*;

import junit.framework.AssertionFailedError;
import lombok.Data;
Expand All @@ -35,11 +36,13 @@
import org.springframework.context.annotation.Import;
import org.springframework.data.annotation.Id;
import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;
import org.springframework.data.jdbc.testing.AssumeFeatureRule;
import org.springframework.data.jdbc.testing.EnabledOnFeature;
import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.repository.CrudRepository;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -52,6 +55,7 @@
*/
@ContextConfiguration
@Transactional
@TestExecutionListeners(value = AssumeFeatureRule.class, mergeMode = MERGE_WITH_DEFAULTS)
public class JdbcRepositoryWithListsIntegrationTests {

@ClassRule public static final SpringClassRule classRule = new SpringClassRule();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import static org.assertj.core.api.Assertions.*;
import static org.springframework.data.jdbc.testing.TestDatabaseFeatures.Feature.*;
import static org.springframework.test.context.TestExecutionListeners.MergeMode.*;

import junit.framework.AssertionFailedError;
import lombok.Data;
Expand All @@ -28,17 +29,21 @@
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.annotation.Id;
import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;
import org.springframework.data.jdbc.testing.AssumeFeatureRule;
import org.springframework.data.jdbc.testing.EnabledOnFeature;
import org.springframework.data.jdbc.testing.TestConfiguration;
import org.springframework.data.repository.CrudRepository;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -51,6 +56,8 @@
*/
@ContextConfiguration
@Transactional
@TestExecutionListeners(value = AssumeFeatureRule.class, mergeMode = MERGE_WITH_DEFAULTS)
@RunWith(SpringRunner.class)
public class JdbcRepositoryWithMapsIntegrationTests {

@Configuration
Expand All @@ -70,9 +77,6 @@ DummyEntityRepository dummyEntityRepository() {
}
}

@ClassRule public static final SpringClassRule classRule = new SpringClassRule();
@Rule public SpringMethodRule methodRule = new SpringMethodRule();

@Autowired NamedParameterJdbcTemplate template;
@Autowired DummyEntityRepository repository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
import org.testcontainers.containers.MSSQLServerContainer;

import com.microsoft.sqlserver.jdbc.SQLServerDataSource;
Expand Down Expand Up @@ -49,7 +50,8 @@ protected DataSource createDataSource() {

if (MSSQL_CONTAINER == null) {

MSSQLServerContainer<?> container = new MSSQLServerContainer<>();
MSSQLServerContainer<?> container = new MSSQLServerContainer<>() //
.withReuse(true);
container.start();

MSSQL_CONTAINER = container;
Expand All @@ -59,6 +61,13 @@ protected DataSource createDataSource() {
sqlServerDataSource.setURL(MSSQL_CONTAINER.getJdbcUrl());
sqlServerDataSource.setUser(MSSQL_CONTAINER.getUsername());
sqlServerDataSource.setPassword(MSSQL_CONTAINER.getPassword());

return sqlServerDataSource;
}


@Override
protected void customizePopulator(ResourceDatabasePopulator populator) {
populator.setIgnoreFailedDrops(true);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CREATE SCHEMA OTHER;

CREATE TABLE OTHER.DUMMY_ENTITY
(
ID BIGINT IDENTITY PRIMARY KEY,
NAME VARCHAR(30)
);

CREATE TABLE OTHER.REFERENCED
(
DUMMY_ENTITY INTEGER,
NAME VARCHAR(30)
);

Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
CREATE TABLE dummy_entity ( id BIGINT AUTO_INCREMENT PRIMARY KEY, NAME VARCHAR(100));
CREATE TABLE element (id BIGINT AUTO_INCREMENT PRIMARY KEY, content BIGINT, Dummy_Entity_key BIGINT,dummy_entity BIGINT);
DROP TABLE ELEMENT;
DROP TABLE DUMMY_ENTITY;

CREATE TABLE dummy_entity ( id BIGINT IDENTITY PRIMARY KEY, NAME VARCHAR(100));
CREATE TABLE element (id BIGINT IDENTITY PRIMARY KEY, content BIGINT, Dummy_Entity_key BIGINT,dummy_entity BIGINT);
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ CREATE TABLE dummy_entity
(
id_Prop BIGINT IDENTITY PRIMARY KEY,
NAME VARCHAR(100),
POINT_IN_TIME TIMESTAMP
POINT_IN_TIME DATETIME
);
4 changes: 2 additions & 2 deletions spring-data-relational/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>spring-data-relational</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0-DATAJDBC-574-SNAPSHOT</version>

<name>Spring Data Relational</name>
<description>Spring Data Relational support</description>

<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-relational-parent</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0-DATAJDBC-574-SNAPSHOT</version>
</parent>

<properties>
Expand Down