test: lib: fix broken retry in start_docker_service

The retry loop in start_docker_service passes the parse callbacks
via std::move into create_handler on each iteration. After the
first iteration, the moved-from std::function objects are empty.
All subsequent retries skip output parsing entirely and
immediately treat the service as successfully started. This
defeats the entire purpose of the retry mechanism.

Fix by passing the callbacks by copy instead of move, so the
original callbacks remain valid across retries.

Fixes SCYLLADB-1542
This commit is contained in:
Dario Mirovic
2026-04-15 15:19:10 +02:00
parent 3d0582d51e
commit 336dab1eec

View File

@@ -253,8 +253,8 @@ future<std::tuple<tests::proc::process_fixture, int>> tests::proc::start_docker_
return std::make_tuple(std::move(h), std::move(f));
};
auto [out_h, out_fut] = create_handler(std::move(stdout_parse), std::cout);
auto [err_h, err_fut] = create_handler(std::move(stderr_parse), std::cerr);
auto [out_h, out_fut] = create_handler(stdout_parse, std::cout);
auto [err_h, err_fut] = create_handler(stderr_parse, std::cerr);
auto ps = co_await process_fixture::create(exec
, params