From be4d32c474551a9dbe5d23e6093b0045d9e26404 Mon Sep 17 00:00:00 2001 From: Dario Mirovic Date: Wed, 15 Apr 2026 15:24:49 +0200 Subject: [PATCH] test: lib: use unique container name per retry attempt The container name is generated once before the retry loop, so all retry attempts reuse the same name. Move the name generation inside the loop so each attempt gets a fresh name via the incrementing counter, consistent with the comment "publish port ephemeral, allows parallel instances". Formatting changes (indentation) of lines 208-225 in test/lib/proc_utils.cc will be fixed in the next commit. Refs SCYLLADB-1542 --- test/lib/proc_utils.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/lib/proc_utils.cc b/test/lib/proc_utils.cc index 51388138d8..525da5cead 100644 --- a/test/lib/proc_utils.cc +++ b/test/lib/proc_utils.cc @@ -200,6 +200,11 @@ future> tests::proc::start_docker_ } static int counter = 0; + + struct in_use{}; + constexpr auto max_retries = 8; + + for (int retries = 0;; ++retries) { container_name = fmt::format("{}-{}-{}", name, ::getpid(), ++counter); // publish port ephemeral, allows parallel instances @@ -219,10 +224,6 @@ future> tests::proc::start_docker_ params.emplace_back(image); params.append_range(image_args); - struct in_use{}; - constexpr auto max_retries = 8; - - for (int retries = 0;; ++retries) { BOOST_TEST_MESSAGE(fmt::format("Will run {}", params)); std::vector env;