BAEL-4706 - Spring Boot with Spring Batch

- Rename testcontainers test to LiveTest
This commit is contained in:
Jonathan Cook 2020-11-18 10:00:24 +01:00
parent a26085b266
commit 8e477f4d9c
1 changed files with 9 additions and 2 deletions

View File

@ -36,11 +36,18 @@ import com.baeldung.kafka.embedded.KafkaConsumer;
import com.baeldung.kafka.embedded.KafkaProducer;
import com.baeldung.kafka.embedded.KafkaProducerConsumerApplication;
/**
* This test class uses Testcontainers to instantiate and manage an external Apache
* Kafka broker hosted inside a Docker container.
*
* Therefore, one of the prerequisites for using Testcontainers is that Docker is installed on the host running this test
*
*/
@RunWith(SpringRunner.class)
@Import(com.baeldung.kafka.testcontainers.KafkaTestContainersIntegrationTest.KafkaTestContainersConfiguration.class)
@Import(com.baeldung.kafka.testcontainers.KafkaTestContainersLiveTest.KafkaTestContainersConfiguration.class)
@SpringBootTest(classes = KafkaProducerConsumerApplication.class)
@DirtiesContext
public class KafkaTestContainersIntegrationTest {
public class KafkaTestContainersLiveTest {
@ClassRule
public static KafkaContainer kafka = new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:5.4.3"));