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.

This commit is contained in:
NagyZoltanPeter 2026-01-29 20:38:03 +01:00
parent 1a140e8473
commit d1fe29f041
No known key found for this signature in database
GPG Key ID: 3E1F97CF4A7B6F42

View File

@ -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):