-
Notifications
You must be signed in to change notification settings - Fork 41.3k
Closed as not planned
Labels
status: duplicateA duplicate of another issueA duplicate of another issue
Description
Currently, spring-boot-testcontainers supports only org.testcontainers.containers.KafkaContainer
, but not org.testcontainers.containers.KafkaContainer
.
The former is for use of confluentinc/cp-kafka
derived images, the later is for use of apache/kafka
derived images.
It's a bit confusing to me why testcontainers chose this specific package structure and didn't introduce a common interface, but it's also confusing that only one variant is supported at the moment, since the documentations exclude the import paths.
Versions
- org.testcontainers:kafka:1.20.1
- org.springframework.boot:spring-boot-testcontainers:3.3.1
Spring Dependency Management Plugin picks 1.19.8 by default. The issue is reproducible on that version as well.
I'd expect the following test to work
import org.testcontainers.kafka.KafkaContainer;
@SpringBootTest
@Testcontainers
class MyIntegrationTests {
@Container
@ServiceConnection
static KafkaContainer kafkaContainer = new KafkaContainer("apache/kafka:3.8.0");
@Test
void myTest() {
// ...
}
}
Currently I get
No ConnectionDetails found for source '@ServiceConnection source for MyIntegrationTests.kafkaContainer'
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsNotFoundException: No ConnectionDetails found for source '@ServiceConnection source for MyIntegrationTests.kafkaContainer'
Exception context added for people to find this issue
Metadata
Metadata
Assignees
Labels
status: duplicateA duplicate of another issueA duplicate of another issue