From ef8a4203643b9402fbfc5d0003c5dd7b19fb16d3 Mon Sep 17 00:00:00 2001 From: Abhijat Malviya Date: Tue, 28 Nov 2023 11:38:24 +0530 Subject: [PATCH] archival/test: Ensure archiver is stopped If the test affected by this change fails, archiver is destroyed without stopping. This also destroys the scrubber, which may have requests active keeping its gate open. This triggers an assertion from seastar related to gate destroyed while requests active. Usually this is prominently visible but in this test it results in the ctest invocation hanging in CI. This causes the build to hang and timeout. The root cause is the test_manifest_spillover not adding segments to the archival meta STM, which can be investigated separately. This change should enable the test to fail in a visible manner with logs seen in CI instead of hanging. --- src/v/archival/tests/ntp_archiver_test.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/v/archival/tests/ntp_archiver_test.cc b/src/v/archival/tests/ntp_archiver_test.cc index 7eb0649e1e92..f4a282824f39 100644 --- a/src/v/archival/tests/ntp_archiver_test.cc +++ b/src/v/archival/tests/ntp_archiver_test.cc @@ -1732,6 +1732,8 @@ static void test_manifest_spillover_impl( *part, amv); + auto stop_archiver = ss::defer([&archiver] { archiver.stop().get(); }); + // Do not start archiver and run spillover manually. vlog( test_log.debug,