Created
May 17, 2023 14:49
-
-
Save eddumelendez/127038ff31efc7030f943b5723bb82dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConsumerApplicationTests { | |
public static void main(String[] args) { | |
SpringApplication.from(ConsumerApplication::main) | |
.with(ContainerConfiguration.class) | |
.run(args); | |
} | |
@TestConfiguration | |
static class ContainerConfiguration { | |
@Bean | |
@ServiceConnection | |
@RestartScope | |
KafkaContainer kafkaContainer() { | |
return new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:7.3.0")) | |
.withReuse(true); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment