From 2c46fd8360791ceb210caf5e1d46a06642dd064a Mon Sep 17 00:00:00 2001 From: Vlad Lazar Date: Wed, 14 Jun 2023 17:14:15 +0100 Subject: [PATCH] cloud_storage: tweak test to use default archiver We have been noticing failures of test_produce_consume_from_cloud while waiting for the intial segment to be uploaded. Looking at the logs, tuns out that the inlined call into the archiver was racing with the usual upload loop. The wait condition has been changed to check that the manifest contains exactly one segment. Fixes #11091 --- src/v/cloud_storage/tests/cloud_storage_e2e_test.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/v/cloud_storage/tests/cloud_storage_e2e_test.cc b/src/v/cloud_storage/tests/cloud_storage_e2e_test.cc index 6f9ab481f48f..809471c0472d 100644 --- a/src/v/cloud_storage/tests/cloud_storage_e2e_test.cc +++ b/src/v/cloud_storage/tests/cloud_storage_e2e_test.cc @@ -79,10 +79,7 @@ FIXTURE_TEST(test_produce_consume_from_cloud, e2e_fixture) { // Upload the closed segment to object storage. tests::cooperative_spin_wait_with_timeout(3s, [&archiver] { - return archiver.upload_next_candidates().then( - [](archival::ntp_archiver::batch_result res) { - return res.non_compacted_upload_result.num_succeeded == 1; - }); + return archiver.manifest().size() == 1; }).get(); auto manifest_res = archiver.upload_manifest("test").get(); BOOST_REQUIRE_EQUAL(manifest_res, cloud_storage::upload_result::success);