fix lp test (#82)

This commit is contained in:
fbarbu15 2024-10-30 10:49:49 +02:00 committed by GitHub
parent e419b7f8a6
commit dbc5bfe0f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -13,6 +13,7 @@ from src.env_vars import (
from src.node.waku_node import WakuNode
from src.steps.common import StepsCommon
from src.test_data import VALID_PUBSUB_TOPICS
from tenacity import retry, stop_after_delay, wait_fixed
logger = get_custom_logger(__name__)
@ -137,3 +138,9 @@ class StepsLightPush(StepsCommon):
payload = {"pubsubTopic": pubsub_topic, "message": message}
payload.update(kwargs)
return payload
@allure.step
@retry(stop=stop_after_delay(120), wait=wait_fixed(1), reraise=True)
def subscribe_and_light_push_with_retry(self):
self.subscribe_to_pubsub_topics_via_relay()
self.check_light_pushed_message_reaches_receiving_peer()

View File

@ -267,9 +267,7 @@ class TestLightPushPublish(StepsLightPush):
self.check_light_pushed_message_reaches_receiving_peer()
self.receiving_node1.restart()
self.receiving_node1.ensure_ready()
delay(30)
self.subscribe_to_pubsub_topics_via_relay()
self.check_light_pushed_message_reaches_receiving_peer()
self.subscribe_and_light_push_with_retry()
def test_light_push_and_retrieve_100_messages(self):
num_messages = 100 # if increase this number make sure to also increase rest-relay-cache-capacity flag