Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/modules/pulsar.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func Run(ctx context.Context, img string, opts ...testcontainers.ContainerCustom
#### Image

Use the second argument in the `Run` function to set a valid Docker image.
In example: `Run(context.Background(), "apachepulsar/pulsar:2.10.2")`.
In example: `Run(context.Background(), "apachepulsar/pulsar:4.0.9")`.

### Container Options

Expand Down
2 changes: 1 addition & 1 deletion modules/pulsar/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func ExampleRun() {
// runPulsarContainer {
ctx := context.Background()

pulsarContainer, err := pulsar.Run(ctx, "apachepulsar/pulsar:2.10.2")
pulsarContainer, err := pulsar.Run(ctx, "apachepulsar/pulsar:4.0.9")
defer func() {
if err := testcontainers.TerminateContainer(pulsarContainer); err != nil {
log.Printf("failed to terminate container: %s", err)
Expand Down
8 changes: 4 additions & 4 deletions modules/pulsar/pulsar.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var defaultWaitStrategies = []wait.Strategy{
resp := string(respBytes)
return resp == `["standalone"]`
}),
wait.ForLog("Successfully updated the policies on namespace public/default"),
wait.ForListeningPort(defaultPulsarPort),
}

type Container struct {
Expand Down Expand Up @@ -129,16 +129,16 @@ func WithTransactions() testcontainers.CustomizeRequestOption {
// Deprecated: use Run instead
// RunContainer creates an instance of the Pulsar container type
func RunContainer(ctx context.Context, opts ...testcontainers.ContainerCustomizer) (*Container, error) {
return Run(ctx, "apachepulsar/pulsar:2.10.2", opts...)
return Run(ctx, "apachepulsar/pulsar:4.0.9", opts...)
}

// Run creates an instance of the Pulsar container type, being possible to pass a custom request and options
// The created container will use the following defaults:
// - image: apachepulsar/pulsar:2.10.2
// - image: apachepulsar/pulsar:4.0.9
// - exposed ports: 6650/tcp, 8080/tcp
// - waiting strategy: wait for all the following strategies:
// - the Pulsar admin API ("/admin/v2/clusters") to be ready on port 8080/tcp and return the response `["standalone"]`
// - the log message "Successfully updated the policies on namespace public/default"
// - the Pulsar port (6650/tcp) to be listening
//
// - command: "/bin/bash -c /pulsar/bin/apply-config-from-env.py /pulsar/conf/standalone.conf && bin/pulsar standalone --no-functions-worker -nss"
func Run(ctx context.Context, img string, opts ...testcontainers.ContainerCustomizer) (*Container, error) {
Expand Down
2 changes: 1 addition & 1 deletion modules/pulsar/pulsar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestPulsar(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
c, err := testcontainerspulsar.Run(
ctx,
"apachepulsar/pulsar:2.10.2",
"apachepulsar/pulsar:4.0.9",
tt.opts...,
)
testcontainers.CleanupContainer(t, c)
Expand Down
Loading