From d1fe29f0414b8477334ae28268e00abb94e48288 Mon Sep 17 00:00:00 2001 From: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com> Date: Thu, 29 Jan 2026 20:38:03 +0100 Subject: [PATCH] Fix test cases where message does not reach relay peer fails due to braking change coming into LMN - when publish would return zero peer instead NoPeersToPublish error is propagated. Fix covers such checks properly. --- src/steps/sharding.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/steps/sharding.py b/src/steps/sharding.py index e39f7f3d9..5086a57f0 100644 --- a/src/steps/sharding.py +++ b/src/steps/sharding.py @@ -195,7 +195,13 @@ class StepsSharding(StepsRelay): self.check_published_message_reaches_relay_peer(pubsub_topic=pubsub_topic, content_topic=content_topic) raise AssertionError("Retrieving messages on not subscribed content topic worked!!!") except Exception as ex: - assert "Not Found" in str(ex) + error_message = str(ex) + expected_errors = [ + "Not Found", + "NoPeersToPublish", + "Failed to publish: publish failed in relay: NoPeersToPublish", + ] + assert any(expected in error_message for expected in expected_errors), error_message @allure.step def check_publish_fails_on_not_subscribed_pubsub_topic(self, pubsub_topic):