From aa7ddc0fdfaa6a6ed3b5f8f9895216b67d400252 Mon Sep 17 00:00:00 2001 From: albihnf Date: Tue, 18 Feb 2025 19:56:33 +0100 Subject: [PATCH] Fix reuse support for CouchbaseContainer (#9957) Fixes #2794 --- .../couchbase/CouchbaseContainer.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/couchbase/src/main/java/org/testcontainers/couchbase/CouchbaseContainer.java b/modules/couchbase/src/main/java/org/testcontainers/couchbase/CouchbaseContainer.java index 25e7637bbaf..1681de30853 100644 --- a/modules/couchbase/src/main/java/org/testcontainers/couchbase/CouchbaseContainer.java +++ b/modules/couchbase/src/main/java/org/testcontainers/couchbase/CouchbaseContainer.java @@ -341,6 +341,13 @@ private void exposePorts() { } } + @Override + protected void containerIsStarting(InspectContainerResponse containerInfo, boolean reused) { + if (!reused) { + containerIsStarting(containerInfo); + } + } + @Override protected void containerIsStarting(final InspectContainerResponse containerInfo) { logger().debug("Couchbase container is starting, performing configuration."); @@ -359,6 +366,13 @@ protected void containerIsStarting(final InspectContainerResponse containerInfo) } } + @Override + protected void containerIsStarted(InspectContainerResponse containerInfo, boolean reused) { + if (!reused) { + this.containerIsStarted(containerInfo); + } + } + @Override protected void containerIsStarted(InspectContainerResponse containerInfo) { timePhase("createBuckets", this::createBuckets);