Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoloboschi committed Apr 9, 2024
1 parent f8b8e60 commit 00eb4e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ public void testPatternConsumerAddingTopicWithServerSideFilters() throws Excepti
pulsarContainer
.getAdmin()
.topics()
.createSubscription(
topicName, "jms-queue", MessageId.earliest, false, subscriptionProperties);
.updateSubscriptionProperties(
topicName, "jms-queue", subscriptionProperties);

Queue newDestination = session.createQueue(topicName);
TextMessage nextMessage = session.createTextMessage("new");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

@Slf4j
public class PulsarContainerExtension implements BeforeAllCallback, AfterAllCallback {
public static final String PULSAR_IMAGE = "apachepulsar/pulsar:3.0.0";
private PulsarContainer pulsarContainer;
private Consumer<PulsarContainerExtension> onContainerReady;
private Map<String, String> env = new HashMap<>();
Expand Down Expand Up @@ -67,7 +68,7 @@ public void afterAll(ExtensionContext extensionContext) {
public void beforeAll(ExtensionContext extensionContext) {
network = Network.newNetwork();
pulsarContainer =
new PulsarContainer(DockerImageName.parse("apachepulsar/pulsar:3.0.0"))
new PulsarContainer(DockerImageName.parse(PULSAR_IMAGE))
.withNetwork(network)
.withEnv(env)
.withLogConsumer(
Expand All @@ -76,13 +77,13 @@ public void beforeAll(ExtensionContext extensionContext) {
MountableFile.forHostPath("target/classes/filters"), "/pulsar/filters");
// start Pulsar and wait for it to be ready to accept requests
pulsarContainer.start();
admin =
PulsarAdmin.builder()
.serviceHttpUrl("http://localhost:" + pulsarContainer.getMappedPort(8080))
.build();
if (onContainerReady != null) {
onContainerReady.accept(this);
}
admin =
PulsarAdmin.builder()
.serviceHttpUrl("http://localhost:" + pulsarContainer.getMappedPort(8080))
.build();
}

public PulsarContainerExtension withOnContainerReady(
Expand Down

0 comments on commit 00eb4e2

Please sign in to comment.