fixes for latest failures (#19)
This commit is contained in:
parent
9d769c47d7
commit
7df4741a36
|
@ -1,15 +1,40 @@
|
|||
allure-pytest
|
||||
black
|
||||
docker
|
||||
marshmallow-dataclass
|
||||
pre-commit
|
||||
pyright
|
||||
pytest
|
||||
pytest-instafail
|
||||
pytest-timeout
|
||||
pytest-xdist
|
||||
pytest-rerunfailures
|
||||
python-dotenv
|
||||
requests
|
||||
tenacity
|
||||
typeguard
|
||||
allure-pytest==2.13.2
|
||||
allure-python-commons==2.13.2
|
||||
attrs==23.1.0
|
||||
black==24.2.0
|
||||
certifi==2023.11.17
|
||||
cfgv==3.4.0
|
||||
charset-normalizer==3.3.2
|
||||
click==8.1.7
|
||||
distlib==0.3.8
|
||||
docker==7.0.0
|
||||
execnet==2.0.2
|
||||
filelock==3.13.1
|
||||
identify==2.5.33
|
||||
idna==3.6
|
||||
iniconfig==2.0.0
|
||||
marshmallow==3.20.1
|
||||
marshmallow-dataclass==8.6.0
|
||||
mypy-extensions==1.0.0
|
||||
nodeenv==1.8.0
|
||||
packaging==23.2
|
||||
pathspec==0.12.1
|
||||
platformdirs==4.1.0
|
||||
pluggy==1.3.0
|
||||
pre-commit==3.6.2
|
||||
pyright==1.1.352
|
||||
pytest==8.0.2
|
||||
pytest-instafail==0.5.0
|
||||
pytest-rerunfailures==13.0
|
||||
pytest-timeout==2.2.0
|
||||
pytest-xdist==3.5.0
|
||||
python-dotenv==1.0.1
|
||||
PyYAML==6.0.1
|
||||
requests==2.31.0
|
||||
setuptools==69.0.3
|
||||
tenacity==8.2.3
|
||||
typeguard==4.1.5
|
||||
typing-inspect==0.9.0
|
||||
typing_extensions==4.9.0
|
||||
urllib3==2.1.0
|
||||
virtualenv==20.25.0
|
||||
|
|
|
@ -93,7 +93,7 @@ class StepsFilter:
|
|||
for index, peer in enumerate(peer_list):
|
||||
logger.debug(f"Checking that peer NODE_{index + 1}:{peer.image} can find the published message")
|
||||
get_messages_response = self.get_filter_messages(message["contentTopic"], pubsub_topic=pubsub_topic, node=peer)
|
||||
assert get_messages_response, f"Peer NODE_{index}:{peer.image} couldn't find any messages"
|
||||
assert get_messages_response, f"Peer NODE_{index + 1}:{peer.image} couldn't find any messages"
|
||||
assert len(get_messages_response) == 1, f"Expected 1 message but got {len(get_messages_response)}"
|
||||
waku_message = WakuMessage(get_messages_response)
|
||||
waku_message.assert_received_message(message)
|
||||
|
@ -106,6 +106,15 @@ class StepsFilter:
|
|||
except Exception as ex:
|
||||
assert "Bad Request" in str(ex) or "Not Found" in str(ex) or "couldn't find any messages" in str(ex)
|
||||
|
||||
@allure.step
|
||||
def wait_for_published_message_to_reach_filter_peer(self, timeout_duration=120, time_between_retries=1, pubsub_topic=None, peer_list=None):
|
||||
@retry(stop=stop_after_delay(timeout_duration), wait=wait_fixed(time_between_retries), reraise=True)
|
||||
def publish_and_check_filter_peer():
|
||||
message = {"payload": to_base64(self.test_payload), "contentTopic": self.test_content_topic, "timestamp": int(time() * 1e9)}
|
||||
self.check_publish_without_filter_subscription(message, pubsub_topic=pubsub_topic, peer_list=peer_list)
|
||||
|
||||
publish_and_check_filter_peer()
|
||||
|
||||
@allure.step
|
||||
def wait_for_subscriptions_on_main_nodes(self, content_topic_list, pubsub_topic=None):
|
||||
if pubsub_topic is None:
|
||||
|
|
|
@ -111,7 +111,7 @@ class StepsRelay:
|
|||
for index, peer in enumerate(peer_list):
|
||||
logger.debug(f"Checking that peer NODE_{index + 1}:{peer.image} can find the published message")
|
||||
get_messages_response = peer.get_relay_messages(pubsub_topic)
|
||||
assert get_messages_response, f"Peer NODE_{index}:{peer.image} couldn't find any messages"
|
||||
assert get_messages_response, f"Peer NODE_{index + 1}:{peer.image} couldn't find any messages"
|
||||
assert len(get_messages_response) == 1, f"Expected 1 message but got {len(get_messages_response)}"
|
||||
waku_message = WakuMessage(get_messages_response)
|
||||
waku_message.assert_received_message(message)
|
||||
|
@ -130,11 +130,11 @@ class StepsRelay:
|
|||
self, timeout_duration=120, time_between_retries=1, pubsub_topic=None, sender=None, peer_list=None
|
||||
):
|
||||
@retry(stop=stop_after_delay(timeout_duration), wait=wait_fixed(time_between_retries), reraise=True)
|
||||
def check_peer_connection():
|
||||
def publish_and_check_relay_peer():
|
||||
message = {"payload": to_base64(self.test_payload), "contentTopic": self.test_content_topic, "timestamp": int(time() * 1e9)}
|
||||
self.check_published_message_reaches_relay_peer(message, pubsub_topic=pubsub_topic, sender=sender, peer_list=peer_list)
|
||||
|
||||
check_peer_connection()
|
||||
publish_and_check_relay_peer()
|
||||
|
||||
@allure.step
|
||||
def ensure_relay_subscriptions_on_nodes(self, node_list, pubsub_topic_list):
|
||||
|
|
|
@ -13,7 +13,7 @@ class TestFilterMultipleNodes(StepsFilter):
|
|||
self.setup_optional_filter_nodes()
|
||||
self.wait_for_subscriptions_on_main_nodes([self.test_content_topic])
|
||||
self.subscribe_optional_filter_nodes([self.test_content_topic])
|
||||
self.check_published_message_reaches_filter_peer()
|
||||
self.wait_for_published_message_to_reach_filter_peer()
|
||||
|
||||
def test_optional_nodes_not_subscribed_to_same_topic(self):
|
||||
self.setup_optional_filter_nodes()
|
||||
|
|
Loading…
Reference in New Issue