From f6842a0f10d6933f451b5f998914f6ac8ba9edc9 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Thu, 28 Nov 2024 20:10:50 +0200 Subject: [PATCH] Try without logs --- tests/integration/ha_tests/helpers.py | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/tests/integration/ha_tests/helpers.py b/tests/integration/ha_tests/helpers.py index 1e2402f0fe..d24b2b589e 100644 --- a/tests/integration/ha_tests/helpers.py +++ b/tests/integration/ha_tests/helpers.py @@ -93,24 +93,27 @@ async def are_writes_increasing( extra_model: Model = None, ) -> None: """Verify new writes are continuing by counting the number of writes.""" + down_units = [down_unit] if isinstance(down_unit, str) or not down_unit else down_unit writes, _ = await count_writes( ops_test, - down_unit=down_unit, + down_unit=down_units[0], use_ip_from_inside=use_ip_from_inside, extra_model=extra_model, ) - logger.info(f"Initial writes {writes}") + # logger.info(f"Initial writes {writes}") - for member, count in writes.items(): - for attempt in Retrying(stop=stop_after_delay(60 * 3), wait=wait_fixed(3)): - with attempt: - more_writes, _ = await count_writes( - ops_test, - down_unit=down_unit, - use_ip_from_inside=use_ip_from_inside, - extra_model=extra_model, - ) - logger.info(f"Retry writes {more_writes}") + for attempt in Retrying(stop=stop_after_delay(60 * 3), wait=wait_fixed(3), reraise=True): + with attempt: + more_writes, _ = await count_writes( + ops_test, + down_unit=down_unit, + use_ip_from_inside=use_ip_from_inside, + extra_model=extra_model, + ) + # logger.info(f"Retry writes {more_writes}") + for member, count in writes.items(): + if "/".join(member.split(".", 1)[-1].rsplit("-", 1)) in down_units: + continue assert more_writes[member] > count, ( f"{member}: writes not continuing to DB (current writes: {more_writes[member]} - previous writes: {count})" )