Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
b498d390
Commit
b498d390
authored
May 26, 2020
by
dreis2211
Committed by
Stephane Nicoll
May 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Testcontainers 1.14.2
See gh-21581
parent
35121f18
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
22 additions
and
25 deletions
+22
-25
CassandraDataAutoConfigurationIntegrationTests.java
...andra/CassandraDataAutoConfigurationIntegrationTests.java
+1
-1
ReactiveElasticsearchRepositoriesAutoConfigurationTests.java
...ctiveElasticsearchRepositoriesAutoConfigurationTests.java
+2
-2
ReactiveElasticsearchRestClientAutoConfigurationTests.java
...eactiveElasticsearchRestClientAutoConfigurationTests.java
+1
-1
RedisRepositoriesAutoConfigurationTests.java
...e/data/redis/RedisRepositoriesAutoConfigurationTests.java
+2
-2
SessionAutoConfigurationRedisTests.java
...configure/session/SessionAutoConfigurationRedisTests.java
+8
-11
build.gradle
spring-boot-project/spring-boot-parent/build.gradle
+1
-1
DataRedisTestIntegrationTests.java
...toconfigure/data/redis/DataRedisTestIntegrationTests.java
+1
-1
DataRedisTestPropertiesIntegrationTests.java
...e/data/redis/DataRedisTestPropertiesIntegrationTests.java
+1
-1
DataRedisTestWithIncludeFilterIntegrationTests.java
...redis/DataRedisTestWithIncludeFilterIntegrationTests.java
+1
-1
DeploymentIntegrationTests.java
...s/src/intTest/java/sample/DeploymentIntegrationTests.java
+2
-2
CityRepositoryTests.java
...c/test/java/smoketest/data/r2dbc/CityRepositoryTests.java
+1
-1
CityRepositoryTests.java
...c/test/java/smoketest/data/r2dbc/CityRepositoryTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java
View file @
b498d390
...
...
@@ -55,7 +55,7 @@ class CassandraDataAutoConfigurationIntegrationTests {
.
withConfiguration
(
AutoConfigurations
.
of
(
CassandraAutoConfiguration
.
class
,
CassandraDataAutoConfiguration
.
class
))
.
withPropertyValues
(
"spring.data.cassandra.contact-points:"
+
cassandra
.
get
ContainerIpAddress
()
+
":"
"spring.data.cassandra.contact-points:"
+
cassandra
.
get
Host
()
+
":"
+
cassandra
.
getFirstMappedPort
(),
"spring.data.cassandra.local-datacenter=datacenter1"
,
"spring.data.cassandra.read-timeout=20s"
,
"spring.data.cassandra.connect-timeout=10s"
)
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java
View file @
b498d390
...
...
@@ -53,8 +53,8 @@ public class ReactiveElasticsearchRepositoriesAutoConfigurationTests {
private
ApplicationContextRunner
contextRunner
=
new
ApplicationContextRunner
()
.
withConfiguration
(
AutoConfigurations
.
of
(
ReactiveElasticsearchRestClientAutoConfiguration
.
class
,
ReactiveElasticsearchRepositoriesAutoConfiguration
.
class
,
ElasticsearchDataAutoConfiguration
.
class
))
.
withPropertyValues
(
"spring.data.elasticsearch.client.reactive.endpoints="
+
elasticsearch
.
get
ContainerIpAddress
()
+
":"
+
elasticsearch
.
get
FirstMappedPort
());
.
withPropertyValues
(
"spring.data.elasticsearch.client.reactive.endpoints="
+
elasticsearch
.
getHost
()
+
":"
+
elasticsearch
.
getFirstMappedPort
());
@Test
void
testDefaultRepositoryConfiguration
()
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRestClientAutoConfigurationTests.java
View file @
b498d390
...
...
@@ -75,7 +75,7 @@ public class ReactiveElasticsearchRestClientAutoConfigurationTests {
@Test
void
restClientCanQueryElasticsearchNode
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.data.elasticsearch.client.reactive.endpoints="
+
elasticsearch
.
get
ContainerIpAddress
()
+
":"
"spring.data.elasticsearch.client.reactive.endpoints="
+
elasticsearch
.
get
Host
()
+
":"
+
elasticsearch
.
getFirstMappedPort
(),
"spring.data.elasticsearch.client.reactive.connection-timeout=120s"
,
"spring.data.elasticsearch.client.reactive.socket-timeout=120s"
).
run
((
context
)
->
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisRepositoriesAutoConfigurationTests.java
View file @
b498d390
...
...
@@ -54,8 +54,8 @@ class RedisRepositoriesAutoConfigurationTests {
@BeforeEach
void
setUp
()
{
TestPropertyValues
.
of
(
"spring.redis.host="
+
redis
.
get
ContainerIpAddress
(),
"spring.redis.port="
+
redis
.
getFirstMappedPort
())
.
applyTo
(
this
.
context
.
getEnvironment
());
TestPropertyValues
.
of
(
"spring.redis.host="
+
redis
.
get
Host
(),
"spring.redis.port="
+
redis
.
getFirstMappedPort
())
.
applyTo
(
this
.
context
.
getEnvironment
());
}
@AfterEach
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationRedisTests.java
View file @
b498d390
...
...
@@ -63,8 +63,9 @@ class SessionAutoConfigurationRedisTests extends AbstractSessionAutoConfiguratio
@Test
void
defaultConfig
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.session.store-type=redis"
,
"spring.redis.host="
+
redis
.
getContainerIpAddress
(),
"spring.redis.port="
+
redis
.
getFirstMappedPort
())
this
.
contextRunner
.
withPropertyValues
(
"spring.session.store-type=redis"
,
"spring.redis.host="
+
redis
.
getHost
(),
"spring.redis.port="
+
redis
.
getFirstMappedPort
())
.
withConfiguration
(
AutoConfigurations
.
of
(
RedisAutoConfiguration
.
class
))
.
run
(
validateSpringSessionUsesRedis
(
"spring:session:event:0:created:"
,
FlushMode
.
ON_SAVE
,
SaveMode
.
ON_SET_ATTRIBUTE
,
"0 * * * * *"
));
...
...
@@ -76,7 +77,7 @@ class SessionAutoConfigurationRedisTests extends AbstractSessionAutoConfiguratio
.
withClassLoader
(
new
FilteredClassLoader
(
HazelcastIndexedSessionRepository
.
class
,
JdbcIndexedSessionRepository
.
class
,
MongoIndexedSessionRepository
.
class
))
.
withConfiguration
(
AutoConfigurations
.
of
(
RedisAutoConfiguration
.
class
))
.
withPropertyValues
(
"spring.redis.host="
+
redis
.
get
ContainerIpAddress
(),
.
withPropertyValues
(
"spring.redis.host="
+
redis
.
get
Host
(),
"spring.redis.port="
+
redis
.
getFirstMappedPort
())
.
run
(
validateSpringSessionUsesRedis
(
"spring:session:event:0:created:"
,
FlushMode
.
ON_SAVE
,
SaveMode
.
ON_SET_ATTRIBUTE
,
"0 * * * * *"
));
...
...
@@ -87,8 +88,7 @@ class SessionAutoConfigurationRedisTests extends AbstractSessionAutoConfiguratio
this
.
contextRunner
.
withConfiguration
(
AutoConfigurations
.
of
(
RedisAutoConfiguration
.
class
))
.
withPropertyValues
(
"spring.session.store-type=redis"
,
"spring.session.redis.namespace=foo"
,
"spring.session.redis.flush-mode=immediate"
,
"spring.session.redis.save-mode=on-get-attribute"
,
"spring.session.redis.cleanup-cron=0 0 12 * * *"
,
"spring.redis.host="
+
redis
.
getContainerIpAddress
(),
"spring.session.redis.cleanup-cron=0 0 12 * * *"
,
"spring.redis.host="
+
redis
.
getHost
(),
"spring.redis.port="
+
redis
.
getFirstMappedPort
())
.
run
(
validateSpringSessionUsesRedis
(
"foo:event:0:created:"
,
FlushMode
.
IMMEDIATE
,
SaveMode
.
ON_GET_ATTRIBUTE
,
"0 0 12 * * *"
));
...
...
@@ -98,16 +98,14 @@ class SessionAutoConfigurationRedisTests extends AbstractSessionAutoConfiguratio
void
redisSessionWithConfigureActionNone
()
{
this
.
contextRunner
.
withConfiguration
(
AutoConfigurations
.
of
(
RedisAutoConfiguration
.
class
))
.
withPropertyValues
(
"spring.session.store-type=redis"
,
"spring.session.redis.configure-action=none"
,
"spring.redis.host="
+
redis
.
getContainerIpAddress
(),
"spring.redis.port="
+
redis
.
getFirstMappedPort
())
"spring.redis.host="
+
redis
.
getHost
(),
"spring.redis.port="
+
redis
.
getFirstMappedPort
())
.
run
(
validateStrategy
(
ConfigureRedisAction
.
NO_OP
.
getClass
()));
}
@Test
void
redisSessionWithDefaultConfigureActionNone
()
{
this
.
contextRunner
.
withConfiguration
(
AutoConfigurations
.
of
(
RedisAutoConfiguration
.
class
))
.
withPropertyValues
(
"spring.session.store-type=redis"
,
"spring.redis.host="
+
redis
.
getContainerIpAddress
(),
.
withPropertyValues
(
"spring.session.store-type=redis"
,
"spring.redis.host="
+
redis
.
getHost
(),
"spring.redis.port="
+
redis
.
getFirstMappedPort
())
.
run
(
validateStrategy
(
ConfigureNotifyKeyspaceEventsAction
.
class
,
entry
(
"notify-keyspace-events"
,
"gxE"
)));
...
...
@@ -117,8 +115,7 @@ class SessionAutoConfigurationRedisTests extends AbstractSessionAutoConfiguratio
void
redisSessionWithCustomConfigureRedisActionBean
()
{
this
.
contextRunner
.
withConfiguration
(
AutoConfigurations
.
of
(
RedisAutoConfiguration
.
class
))
.
withUserConfiguration
(
MaxEntriesRedisAction
.
class
)
.
withPropertyValues
(
"spring.session.store-type=redis"
,
"spring.redis.host="
+
redis
.
getContainerIpAddress
(),
.
withPropertyValues
(
"spring.session.store-type=redis"
,
"spring.redis.host="
+
redis
.
getHost
(),
"spring.redis.port="
+
redis
.
getFirstMappedPort
())
.
run
(
validateStrategy
(
MaxEntriesRedisAction
.
class
,
entry
(
"set-max-intset-entries"
,
"1024"
)));
...
...
spring-boot-project/spring-boot-parent/build.gradle
View file @
b498d390
...
...
@@ -13,7 +13,7 @@ javaPlatform {
dependencies
{
api
(
platform
(
project
(
":spring-boot-project:spring-boot-dependencies"
)))
api
(
platform
(
"org.testcontainers:testcontainers-bom:1.14.
1
"
))
api
(
platform
(
"org.testcontainers:testcontainers-bom:1.14.
2
"
))
constraints
{
api
(
"com.vaadin.external.google:android-json:0.0.20131108.vaadin1"
)
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/redis/DataRedisTestIntegrationTests.java
View file @
b498d390
...
...
@@ -60,7 +60,7 @@ class DataRedisTestIntegrationTests {
@DynamicPropertySource
static
void
redisProperties
(
DynamicPropertyRegistry
registry
)
{
registry
.
add
(
"spring.redis.host"
,
redis:
:
get
ContainerIpAddress
);
registry
.
add
(
"spring.redis.host"
,
redis:
:
get
Host
);
registry
.
add
(
"spring.redis.port"
,
redis:
:
getFirstMappedPort
);
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/redis/DataRedisTestPropertiesIntegrationTests.java
View file @
b498d390
...
...
@@ -46,7 +46,7 @@ class DataRedisTestPropertiesIntegrationTests {
@DynamicPropertySource
static
void
redisProperties
(
DynamicPropertyRegistry
registry
)
{
registry
.
add
(
"spring.redis.host"
,
redis:
:
get
ContainerIpAddress
);
registry
.
add
(
"spring.redis.host"
,
redis:
:
get
Host
);
registry
.
add
(
"spring.redis.port"
,
redis:
:
getFirstMappedPort
);
}
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/redis/DataRedisTestWithIncludeFilterIntegrationTests.java
View file @
b498d390
...
...
@@ -49,7 +49,7 @@ class DataRedisTestWithIncludeFilterIntegrationTests {
@DynamicPropertySource
static
void
redisProperties
(
DynamicPropertyRegistry
registry
)
{
registry
.
add
(
"spring.redis.host"
,
redis:
:
get
ContainerIpAddress
);
registry
.
add
(
"spring.redis.host"
,
redis:
:
get
Host
);
registry
.
add
(
"spring.redis.port"
,
redis:
:
getFirstMappedPort
);
}
...
...
spring-boot-tests/spring-boot-deployment-tests/src/intTest/java/sample/DeploymentIntegrationTests.java
View file @
b498d390
...
...
@@ -103,8 +103,8 @@ class DeploymentIntegrationTests {
this
.
port
))
{
container
.
start
();
TestRestTemplate
rest
=
new
TestRestTemplate
(
new
RestTemplateBuilder
()
.
rootUri
(
"http://"
+
container
.
get
ContainerIpAddress
()
+
":"
+
container
.
getMappedPort
(
this
.
port
)
+
"/spring-boot"
)
.
rootUri
(
"http://"
+
container
.
get
Host
()
+
":"
+
container
.
getMappedPort
(
this
.
port
)
+
"/spring-boot"
)
.
requestFactory
(()
->
new
HttpComponentsClientHttpRequestFactory
(
HttpClients
.
custom
()
.
setRetryHandler
(
new
StandardHttpRequestRetryHandler
(
10
,
false
)).
build
())));
try
{
...
...
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-r2dbc-flyway/src/test/java/smoketest/data/r2dbc/CityRepositoryTests.java
View file @
b498d390
...
...
@@ -61,7 +61,7 @@ class CityRepositoryTests {
}
private
static
String
r2dbcUrl
()
{
return
String
.
format
(
"r2dbc:postgresql://%s:%s/%s"
,
postgresql
.
get
ContainerIpAddress
(),
return
String
.
format
(
"r2dbc:postgresql://%s:%s/%s"
,
postgresql
.
get
Host
(),
postgresql
.
getMappedPort
(
PostgreSQLContainer
.
POSTGRESQL_PORT
),
postgresql
.
getDatabaseName
());
}
...
...
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-r2dbc-liquibase/src/test/java/smoketest/data/r2dbc/CityRepositoryTests.java
View file @
b498d390
...
...
@@ -61,7 +61,7 @@ class CityRepositoryTests {
}
private
static
String
r2dbcUrl
()
{
return
String
.
format
(
"r2dbc:postgresql://%s:%s/%s"
,
postgresql
.
get
ContainerIpAddress
(),
return
String
.
format
(
"r2dbc:postgresql://%s:%s/%s"
,
postgresql
.
get
Host
(),
postgresql
.
getMappedPort
(
PostgreSQLContainer
.
POSTGRESQL_PORT
),
postgresql
.
getDatabaseName
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment