From d4fb1f3c04ac358001f2794a8ee123f07873410c Mon Sep 17 00:00:00 2001 From: Abhijat Malviya Date: Mon, 9 Oct 2023 18:20:36 +0530 Subject: [PATCH] cloud_storage/ducktape: Wait for chunk obs. to stop Tests which use chunk observer should wait for it to stop after the stop command is issued, to avoid the underlying set changing while it is being read from. (cherry picked from commit 524a2307d11592e5f50be3b110243c6d21c4f082) --- tests/rptest/tests/cloud_storage_chunk_read_path_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/rptest/tests/cloud_storage_chunk_read_path_test.py b/tests/rptest/tests/cloud_storage_chunk_read_path_test.py index 28bd0cf5b273..8a5b880e3229 100644 --- a/tests/rptest/tests/cloud_storage_chunk_read_path_test.py +++ b/tests/rptest/tests/cloud_storage_chunk_read_path_test.py @@ -346,6 +346,9 @@ def test_read_when_cache_smaller_than_segment_size(self): self._consume_baseline(timeout=180, max_msgs=read_count) observe_cache_dir.stop() + observe_cache_dir.join(timeout=10) + assert not observe_cache_dir.is_alive( + ), 'cache observer is unexpectedly alive' self._assert_not_in_cache(fr'.*kafka/{self.topic}/.*\.log\.[0-9]+$') self._assert_in_cache(f'.*kafka/{self.topic}/.*_chunks/[0-9]+')