Skip to content

Commit 7fb21fb

Browse files
committed
Merge branch '2.3.x'
Closes gh-24104
2 parents 33d83eb + c1a1b5f commit 7fb21fb

File tree

7 files changed

+10
-4
lines changed

7 files changed

+10
-4
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
3232
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration;
3333
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
34+
import org.springframework.boot.testsupport.testcontainers.VersionOverridingElasticsearchContainer;
3435
import org.springframework.context.annotation.Configuration;
3536
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
3637
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.springframework.boot.autoconfigure.data.elasticsearch.city.ReactiveCityRepository;
3131
import org.springframework.boot.autoconfigure.data.empty.EmptyDataPackage;
3232
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
33+
import org.springframework.boot.testsupport.testcontainers.VersionOverridingElasticsearchContainer;
3334
import org.springframework.context.annotation.Configuration;
3435
import org.springframework.data.elasticsearch.core.ReactiveElasticsearchTemplate;
3536
import org.springframework.data.elasticsearch.repository.config.EnableReactiveElasticsearchRepositories;

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRestClientAutoConfigurationTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import org.springframework.boot.autoconfigure.AutoConfigurations;
3232
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
33+
import org.springframework.boot.testsupport.testcontainers.VersionOverridingElasticsearchContainer;
3334
import org.springframework.context.annotation.Bean;
3435
import org.springframework.context.annotation.Configuration;
3536
import org.springframework.data.elasticsearch.client.ClientConfiguration;

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchRestClientAutoConfigurationTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
import org.springframework.boot.autoconfigure.AutoConfigurations;
4343
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
44+
import org.springframework.boot.testsupport.testcontainers.VersionOverridingElasticsearchContainer;
4445
import org.springframework.context.annotation.Bean;
4546
import org.springframework.context.annotation.Configuration;
4647

@@ -58,8 +59,8 @@
5859
class ElasticsearchRestClientAutoConfigurationTests {
5960

6061
@Container
61-
static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer().withStartupAttempts(5)
62-
.withStartupTimeout(Duration.ofMinutes(10));
62+
static final ElasticsearchContainer elasticsearch = new VersionOverridingElasticsearchContainer()
63+
.withStartupAttempts(5).withStartupTimeout(Duration.ofMinutes(10));
6364

6465
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
6566
.withConfiguration(AutoConfigurations.of(ElasticsearchRestClientAutoConfiguration.class));

spring-boot-project/spring-boot-parent/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ bom {
156156
]
157157
}
158158
}
159-
library("Testcontainers", "1.14.3") {
159+
library("Testcontainers", "1.15.0") {
160160
group("org.testcontainers") {
161161
imports = [
162162
"testcontainers-bom"

spring-boot-project/spring-boot-tools/spring-boot-test-support/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ dependencies {
1111
compileOnly("com.datastax.oss:java-driver-core")
1212
compileOnly("javax.servlet:javax.servlet-api")
1313
compileOnly("junit:junit")
14+
compileOnly("org.elasticsearch:elasticsearch")
1415
compileOnly("org.junit.jupiter:junit-jupiter")
1516
compileOnly("org.junit.platform:junit-platform-engine")
1617
compileOnly("org.mockito:mockito-core")
1718
compileOnly("org.springframework:spring-context")
1819
compileOnly("org.springframework.data:spring-data-redis")
20+
compileOnly("org.testcontainers:elasticsearch")
1921
compileOnly("org.testcontainers:testcontainers")
2022

2123
implementation("org.apache.maven.resolver:maven-resolver-connector-basic")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.boot.autoconfigure.data.elasticsearch;
16+
package org.springframework.boot.testsupport.testcontainers;
1717

1818
import org.elasticsearch.Version;
1919
import org.testcontainers.elasticsearch.ElasticsearchContainer;

0 commit comments

Comments
 (0)