Created
May 17, 2023 14:50
-
-
Save eddumelendez/aceb5957e1f6183a949f63c856284551 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 | |
@RestartScope | |
PulsarContainer pulsarContainer(DynamicPropertyRegistry registry) { | |
PulsarContainer pulsar = new PulsarContainer(DockerImageName.parse("apachepulsar/pulsar:2.11.0")) | |
.withReuse(true); | |
registry.add("spring.pulsar.client.service-url", pulsar::getPulsarBrokerUrl); | |
return pulsar; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment