Merge branch '2.7.x' into 3.0.x

pull/35611/head
Moritz Halbritter 2 years ago
commit 037cb8c5b0

@ -27,6 +27,7 @@ import com.couchbase.client.java.env.ClusterEnvironment;
import com.couchbase.client.java.json.JsonObject; import com.couchbase.client.java.json.JsonObject;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.OS;
import org.testcontainers.couchbase.BucketDefinition; import org.testcontainers.couchbase.BucketDefinition;
import org.testcontainers.couchbase.CouchbaseContainer; import org.testcontainers.couchbase.CouchbaseContainer;
import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Container;
@ -34,6 +35,7 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.testsupport.junit.DisabledOnOs;
import org.springframework.boot.testsupport.testcontainers.DockerImageNames; import org.springframework.boot.testsupport.testcontainers.DockerImageNames;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
@ -44,6 +46,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll * @author Stephane Nicoll
* @author Brian Clozel * @author Brian Clozel
*/ */
@DisabledOnOs(os = { OS.LINUX, OS.MAC }, architecture = "aarch64",
disabledReason = "The Couchbase image has no ARM support")
@Testcontainers(disabledWithoutDocker = true) @Testcontainers(disabledWithoutDocker = true)
class CouchbaseAutoConfigurationIntegrationTests { class CouchbaseAutoConfigurationIntegrationTests {

@ -51,6 +51,7 @@ class ElasticsearchRepositoriesAutoConfigurationTests {
@Container @Container
static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())
.withEnv("ES_JAVA_OPTS", "-Xmx1g")
.withStartupAttempts(5) .withStartupAttempts(5)
.withStartupTimeout(Duration.ofMinutes(10)); .withStartupTimeout(Duration.ofMinutes(10));

@ -54,6 +54,7 @@ class ReactiveElasticsearchRepositoriesAutoConfigurationTests {
@Container @Container
static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())
.withEnv("ES_JAVA_OPTS", "-Xmx1g")
.withStartupAttempts(5) .withStartupAttempts(5)
.withStartupTimeout(Duration.ofMinutes(10)); .withStartupTimeout(Duration.ofMinutes(10));

@ -43,6 +43,7 @@ class ElasticsearchClientAutoConfigurationIntegrationTests {
@Container @Container
static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())
.withEnv("ES_JAVA_OPTS", "-Xmx1g")
.withStartupAttempts(5) .withStartupAttempts(5)
.withStartupTimeout(Duration.ofMinutes(10)); .withStartupTimeout(Duration.ofMinutes(10));

@ -48,6 +48,7 @@ class ElasticsearchRestClientAutoConfigurationIntegrationTests {
@Container @Container
static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())
.withEnv("ES_JAVA_OPTS", "-Xmx1g")
.withStartupAttempts(5) .withStartupAttempts(5)
.withStartupTimeout(Duration.ofMinutes(10)); .withStartupTimeout(Duration.ofMinutes(10));

@ -46,6 +46,7 @@ class ReactiveElasticsearchClientAutoConfigurationIntegrationTests {
@Container @Container
static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())
.withEnv("ES_JAVA_OPTS", "-Xmx1g")
.withStartupAttempts(5) .withStartupAttempts(5)
.withStartupTimeout(Duration.ofMinutes(10)); .withStartupTimeout(Duration.ofMinutes(10));

@ -19,6 +19,7 @@ package org.springframework.boot.test.autoconfigure.data.couchbase;
import java.time.Duration; import java.time.Duration;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.OS;
import org.testcontainers.couchbase.BucketDefinition; import org.testcontainers.couchbase.BucketDefinition;
import org.testcontainers.couchbase.CouchbaseContainer; import org.testcontainers.couchbase.CouchbaseContainer;
import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Container;
@ -26,6 +27,7 @@ import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.testsupport.junit.DisabledOnOs;
import org.springframework.boot.testsupport.testcontainers.DockerImageNames; import org.springframework.boot.testsupport.testcontainers.DockerImageNames;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.data.couchbase.core.CouchbaseTemplate; import org.springframework.data.couchbase.core.CouchbaseTemplate;
@ -42,6 +44,8 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
*/ */
@DataCouchbaseTest(properties = "spring.couchbase.env.timeouts.connect=2m") @DataCouchbaseTest(properties = "spring.couchbase.env.timeouts.connect=2m")
@Testcontainers(disabledWithoutDocker = true) @Testcontainers(disabledWithoutDocker = true)
@DisabledOnOs(os = { OS.LINUX, OS.MAC }, architecture = "aarch64",
disabledReason = "The Couchbase image has no ARM support")
class DataCouchbaseTestIntegrationTests { class DataCouchbaseTestIntegrationTests {
private static final String BUCKET_NAME = "cbbucket"; private static final String BUCKET_NAME = "cbbucket";

@ -19,12 +19,14 @@ package org.springframework.boot.test.autoconfigure.data.couchbase;
import java.time.Duration; import java.time.Duration;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.OS;
import org.testcontainers.couchbase.BucketDefinition; import org.testcontainers.couchbase.BucketDefinition;
import org.testcontainers.couchbase.CouchbaseContainer; import org.testcontainers.couchbase.CouchbaseContainer;
import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.testsupport.junit.DisabledOnOs;
import org.springframework.boot.testsupport.testcontainers.DockerImageNames; import org.springframework.boot.testsupport.testcontainers.DockerImageNames;
import org.springframework.data.couchbase.core.ReactiveCouchbaseTemplate; import org.springframework.data.couchbase.core.ReactiveCouchbaseTemplate;
import org.springframework.test.context.DynamicPropertyRegistry; import org.springframework.test.context.DynamicPropertyRegistry;
@ -40,6 +42,8 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
@DataCouchbaseTest @DataCouchbaseTest
@Testcontainers(disabledWithoutDocker = true) @Testcontainers(disabledWithoutDocker = true)
@DisabledOnOs(os = { OS.LINUX, OS.MAC }, architecture = "aarch64",
disabledReason = "The Couchbase image has no ARM support")
class DataCouchbaseTestReactiveIntegrationTests { class DataCouchbaseTestReactiveIntegrationTests {
private static final String BUCKET_NAME = "cbbucket"; private static final String BUCKET_NAME = "cbbucket";

@ -19,12 +19,14 @@ package org.springframework.boot.test.autoconfigure.data.couchbase;
import java.time.Duration; import java.time.Duration;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.OS;
import org.testcontainers.couchbase.BucketDefinition; import org.testcontainers.couchbase.BucketDefinition;
import org.testcontainers.couchbase.CouchbaseContainer; import org.testcontainers.couchbase.CouchbaseContainer;
import org.testcontainers.junit.jupiter.Container; import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.junit.jupiter.Testcontainers;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.testsupport.junit.DisabledOnOs;
import org.springframework.boot.testsupport.testcontainers.DockerImageNames; import org.springframework.boot.testsupport.testcontainers.DockerImageNames;
import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -41,6 +43,8 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
@DataCouchbaseTest(includeFilters = @Filter(Service.class)) @DataCouchbaseTest(includeFilters = @Filter(Service.class))
@Testcontainers(disabledWithoutDocker = true) @Testcontainers(disabledWithoutDocker = true)
@DisabledOnOs(os = { OS.LINUX, OS.MAC }, architecture = "aarch64",
disabledReason = "The Couchbase image has no ARM support")
class DataCouchbaseTestWithIncludeFilterIntegrationTests { class DataCouchbaseTestWithIncludeFilterIntegrationTests {
private static final String BUCKET_NAME = "cbbucket"; private static final String BUCKET_NAME = "cbbucket";

@ -46,6 +46,7 @@ class DataElasticsearchTestIntegrationTests {
@Container @Container
static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())
.withEnv("ES_JAVA_OPTS", "-Xmx1g")
.withStartupAttempts(5) .withStartupAttempts(5)
.withStartupTimeout(Duration.ofMinutes(10)); .withStartupTimeout(Duration.ofMinutes(10));

@ -44,6 +44,7 @@ class DataElasticsearchTestPropertiesIntegrationTests {
@Container @Container
static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())
.withEnv("ES_JAVA_OPTS", "-Xmx1g")
.withStartupAttempts(5) .withStartupAttempts(5)
.withStartupTimeout(Duration.ofMinutes(10)); .withStartupTimeout(Duration.ofMinutes(10));

@ -43,6 +43,7 @@ class DataElasticsearchTestReactiveIntegrationTests {
@Container @Container
static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())
.withEnv("ES_JAVA_OPTS", "-Xmx1g")
.withStartupAttempts(5) .withStartupAttempts(5)
.withStartupTimeout(Duration.ofMinutes(10)); .withStartupTimeout(Duration.ofMinutes(10));

@ -45,6 +45,7 @@ class DataElasticsearchTestWithIncludeFilterIntegrationTests {
@Container @Container
static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch())
.withEnv("ES_JAVA_OPTS", "-Xmx1g")
.withStartupAttempts(5) .withStartupAttempts(5)
.withStartupTimeout(Duration.ofMinutes(10)); .withStartupTimeout(Duration.ofMinutes(10));

Loading…
Cancel
Save