From 76799e8a32090dac73d5a3199ad4186d96b92ae6 Mon Sep 17 00:00:00 2001 From: Benny Halevy Date: Tue, 28 Apr 2026 00:25:54 +0300 Subject: [PATCH] test/cluster/dtest: wide_rows_test.py: fix expect_warning mutation across nodes In validate_log_warnings(), expect_warning was reassigned inside the per-node loop, so if the first node set it to False (due to no sstables on disk), all subsequent nodes would inherit that value regardless of their own state. Use a local variable (node_expect_warning) instead of mutating the function parameter. --- test/cluster/dtest/wide_rows_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cluster/dtest/wide_rows_test.py b/test/cluster/dtest/wide_rows_test.py index 99774ffb62..a806efa945 100644 --- a/test/cluster/dtest/wide_rows_test.py +++ b/test/cluster/dtest/wide_rows_test.py @@ -471,8 +471,8 @@ class TestWideRows(Tester): # Search warning in the log current_node_info = cluster_state[node.name] - expect_warning = expect_warning if not expect_warning else bool(current_node_info["sstables_from_disk"]) - self.search_warning(node=node, warning_text=f"Writing large {entity_type} {keyspace_name}/{table_name}:", marked_logs_dict=marked_logs_dict or {}, expect_warning=expect_warning) + node_expect_warning = expect_warning if not expect_warning else bool(current_node_info["sstables_from_disk"]) + self.search_warning(node=node, warning_text=f"Writing large {entity_type} {keyspace_name}/{table_name}:", marked_logs_dict=marked_logs_dict or {}, expect_warning=node_expect_warning) def set_ttl_on_few_rows_in_partition( # noqa: PLR0913 self,