Move Hazelcast testcontainers support into spring-boot-hazelcast

This commit is contained in:
Stéphane Nicoll
2025-05-19 15:57:38 +02:00
committed by Phillip Webb
parent f992c9a2cb
commit e3f66ee591
11 changed files with 21 additions and 7 deletions

View File

@@ -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"
}
@@ -17,12 +18,19 @@ dependencies {
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
optional(project(":spring-boot-project:spring-boot-jpa"))
optional(project(":spring-boot-project:spring-boot-testcontainers"))
optional("com.hazelcast:hazelcast-spring")
optional("org.slf4j:slf4j-api")
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")
testCompileOnly("com.fasterxml.jackson.core:jackson-annotations")
testImplementation(project(":spring-boot-project:spring-boot-test"))
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-testcontainers")))
testRuntimeOnly("com.h2database:h2")
testRuntimeOnly("ch.qos.logback:logback-classic")

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
</configuration>

View File

@@ -0,0 +1 @@
spring.test.context.cache.maxSize=1

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.testcontainers.service.connection.hazelcast;
package org.springframework.boot.hazelcast.testcontainers;
import java.util.Map;

View File

@@ -17,4 +17,4 @@
/**
* Support for testcontainers Hazelcast service connections.
*/
package org.springframework.boot.testcontainers.service.connection.hazelcast;
package org.springframework.boot.hazelcast.testcontainers;

View File

@@ -0,0 +1,3 @@
# Connection Details Factories
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
org.springframework.boot.hazelcast.testcontainers.HazelcastContainerConnectionDetailsFactory

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.testcontainers.service.connection.hazelcast;
package org.springframework.boot.hazelcast.testcontainers;
import com.hazelcast.client.config.ClientConfig;
import org.junit.jupiter.api.Test;

View File

@@ -42,7 +42,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-hazelcast"))
optional(project(":spring-boot-project:spring-boot-jdbc"))
optional(project(":spring-boot-project:spring-boot-kafka"))
optional(project(":spring-boot-project:spring-boot-ldap"))

View File

@@ -1,6 +1,5 @@
# Connection Details Factories
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
org.springframework.boot.testcontainers.service.connection.hazelcast.HazelcastContainerConnectionDetailsFactory,\
org.springframework.boot.testcontainers.service.connection.kafka.ApacheKafkaContainerConnectionDetailsFactory,\
org.springframework.boot.testcontainers.service.connection.kafka.ConfluentKafkaContainerConnectionDetailsFactory,\
org.springframework.boot.testcontainers.service.connection.kafka.DeprecatedConfluentKafkaContainerConnectionDetailsFactory,\