Upgrade to Pulsar 4.2.0

This commit updates the managed version of Pulsar from
`4.1.3` to `4.2.0` and the test image version from
`3.3.3` to `4.2.0`.

Since Pulsar `4.2.0` standalone mode advertises the container's FQDN
(the container ID) instead of localhost. The Pulsar client reconnects
to the advertised address during servicediscovery, but is unable to
reach the FQDN. Therefore, this also sets the `advertisedAddress`
on the Pulsar testcontainers used by the tests.

See gh-49900

Signed-off-by: onobc <chris.bono@gmail.com>
This commit is contained in:
onobc
2026-04-07 06:43:03 +02:00
committed by Stéphane Nicoll
parent ccfb36cc99
commit 85af0d645d
2 changed files with 4 additions and 3 deletions
@@ -238,9 +238,10 @@ public enum TestImage {
/**
* A container image suitable for testing Pulsar.
*/
PULSAR("apachepulsar/pulsar", "3.3.3", () -> PulsarContainer.class,
PULSAR("apachepulsar/pulsar", "4.2.0", () -> PulsarContainer.class,
(container) -> ((PulsarContainer) container).withStartupAttempts(2)
.withStartupTimeout(Duration.ofMinutes(3))),
.withStartupTimeout(Duration.ofMinutes(3))
.withEnv("PULSAR_PREFIX_advertisedAddress", "localhost")),
/**
* A container image suitable for testing Pulsar using the deprecated