Move Kafka testcontainers support into spring-boot-kafka
This commit is contained in:
committed by
Phillip Webb
parent
e3f66ee591
commit
9a4f65a740
@@ -3,6 +3,7 @@ plugins {
|
||||
id "org.springframework.boot.auto-configuration"
|
||||
id "org.springframework.boot.configuration-properties"
|
||||
id "org.springframework.boot.deployed"
|
||||
id "org.springframework.boot.docker-test"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
@@ -14,7 +15,14 @@ dependencies {
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-metrics"))
|
||||
optional(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
optional("org.apache.kafka:kafka-streams")
|
||||
optional("org.testcontainers:kafka")
|
||||
optional("org.testcontainers:redpanda")
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.kafka;
|
||||
package org.springframework.boot.kafka.testcontainers;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.kafka;
|
||||
package org.springframework.boot.kafka.testcontainers;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.kafka;
|
||||
package org.springframework.boot.kafka.testcontainers;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.redpanda;
|
||||
package org.springframework.boot.kafka.testcontainers;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||
</configuration>
|
||||
@@ -0,0 +1 @@
|
||||
spring.test.context.cache.maxSize=1
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.kafka;
|
||||
package org.springframework.boot.kafka.testcontainers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.kafka;
|
||||
package org.springframework.boot.kafka.testcontainers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.kafka;
|
||||
package org.springframework.boot.kafka.testcontainers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.redpanda;
|
||||
package org.springframework.boot.kafka.testcontainers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
/**
|
||||
* Support for testcontainers Kafka service connections.
|
||||
*/
|
||||
package org.springframework.boot.testcontainers.service.connection.kafka;
|
||||
package org.springframework.boot.kafka.testcontainers;
|
||||
@@ -0,0 +1,6 @@
|
||||
# Connection Details Factories
|
||||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
org.springframework.boot.kafka.testcontainers.ApacheKafkaContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.kafka.testcontainers.ConfluentKafkaContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.kafka.testcontainers.DeprecatedConfluentKafkaContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.kafka.testcontainers.RedpandaContainerConnectionDetailsFactory
|
||||
@@ -12,7 +12,6 @@ dependencies {
|
||||
api(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-kafka"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-pulsar"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-r2dbc"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
@@ -30,7 +29,6 @@ dependencies {
|
||||
dockerTestImplementation("org.springframework:spring-core-test")
|
||||
dockerTestImplementation("org.springframework:spring-jdbc")
|
||||
dockerTestImplementation("org.springframework.data:spring-data-redis")
|
||||
dockerTestImplementation("org.springframework.kafka:spring-kafka")
|
||||
dockerTestImplementation("org.springframework.ldap:spring-ldap-core")
|
||||
dockerTestImplementation("org.springframework.pulsar:spring-pulsar")
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
@@ -43,7 +41,6 @@ dependencies {
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure-all"))
|
||||
optional(project(":spring-boot-project:spring-boot-data-redis"))
|
||||
optional(project(":spring-boot-project:spring-boot-jdbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-kafka"))
|
||||
optional(project(":spring-boot-project:spring-boot-ldap"))
|
||||
optional(project(":spring-boot-project:spring-boot-mongodb"))
|
||||
optional(project(":spring-boot-project:spring-boot-neo4j"))
|
||||
@@ -56,7 +53,6 @@ dependencies {
|
||||
optional("org.testcontainers:clickhouse")
|
||||
optional("org.testcontainers:grafana")
|
||||
optional("org.testcontainers:jdbc")
|
||||
optional("org.testcontainers:kafka")
|
||||
optional("org.testcontainers:ldap")
|
||||
optional("org.testcontainers:mariadb")
|
||||
optional("org.testcontainers:mongodb")
|
||||
@@ -67,7 +63,6 @@ dependencies {
|
||||
optional("org.testcontainers:oracle-free")
|
||||
optional("org.testcontainers:postgresql")
|
||||
optional("org.testcontainers:pulsar")
|
||||
optional("org.testcontainers:redpanda")
|
||||
optional("org.testcontainers:r2dbc")
|
||||
optional("com.redis:testcontainers-redis")
|
||||
|
||||
@@ -76,7 +71,6 @@ dependencies {
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-testcontainers")))
|
||||
testImplementation("org.springframework:spring-jdbc")
|
||||
testImplementation("org.springframework.data:spring-data-redis")
|
||||
testImplementation("org.springframework.kafka:spring-kafka")
|
||||
testImplementation("org.testcontainers:junit-jupiter")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Support for testcontainers Redpanda service connections.
|
||||
*/
|
||||
package org.springframework.boot.testcontainers.service.connection.redpanda;
|
||||
@@ -1,8 +1,5 @@
|
||||
# Connection Details Factories
|
||||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
org.springframework.boot.testcontainers.service.connection.kafka.ApacheKafkaContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.kafka.ConfluentKafkaContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.kafka.DeprecatedConfluentKafkaContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.ldap.LLdapContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.ldap.OpenLdapContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.mongo.MongoContainerConnectionDetailsFactory,\
|
||||
@@ -22,5 +19,4 @@ org.springframework.boot.testcontainers.service.connection.r2dbc.OracleXeR2dbcCo
|
||||
org.springframework.boot.testcontainers.service.connection.r2dbc.PostgresR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.r2dbc.SqlServerR2dbcContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.redis.RedisContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.redpanda.RedpandaContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.zipkin.ZipkinContainerConnectionDetailsFactory
|
||||
|
||||
@@ -18,7 +18,7 @@ configurations.all {
|
||||
dependencies {
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-testcontainers-all"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
dockerTestImplementation("org.awaitility:awaitility")
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
dockerTestImplementation("org.testcontainers:kafka")
|
||||
|
||||
Reference in New Issue
Block a user