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.
This commit is contained in:
Benny Halevy
2026-04-28 00:25:54 +03:00
parent fb09604158
commit 76799e8a32

View File

@@ -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,