From 524a2307d11592e5f50be3b110243c6d21c4f082 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. --- 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 303de8d61df4f..1429a067d2bd2 100644 --- a/tests/rptest/tests/cloud_storage_chunk_read_path_test.py +++ b/tests/rptest/tests/cloud_storage_chunk_read_path_test.py @@ -369,6 +369,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]+')