fix remaining tests
This commit is contained in:
parent
3b122de7b4
commit
766aee8544
|
@ -122,3 +122,9 @@ class StepsRelay:
|
||||||
message = {"payload": to_base64(self.test_payload), "contentTopic": self.test_content_topic, "timestamp": int(time() * 1e9)}
|
message = {"payload": to_base64(self.test_payload), "contentTopic": self.test_content_topic, "timestamp": int(time() * 1e9)}
|
||||||
message.update(kwargs)
|
message.update(kwargs)
|
||||||
return message
|
return message
|
||||||
|
|
||||||
|
@allure.step
|
||||||
|
@retry(stop=stop_after_delay(30), wait=wait_fixed(1), reraise=True)
|
||||||
|
def subscribe_and_publish_with_retry(self, node_list, pubsub_topic_list):
|
||||||
|
self.ensure_relay_subscriptions_on_nodes(node_list, pubsub_topic_list)
|
||||||
|
self.check_published_message_reaches_relay_peer()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
from src.env_vars import NODE_1
|
from src.env_vars import NODE_1, NODE_2
|
||||||
from src.libs.common import delay, to_base64
|
from src.libs.common import delay, to_base64
|
||||||
from src.libs.custom_logger import get_custom_logger
|
from src.libs.custom_logger import get_custom_logger
|
||||||
from src.test_data import SAMPLE_INPUTS, SAMPLE_TIMESTAMPS
|
from src.test_data import SAMPLE_INPUTS, SAMPLE_TIMESTAMPS
|
||||||
|
@ -39,7 +39,7 @@ class TestFilterGetMessages(StepsFilter):
|
||||||
def test_filter_get_message_with_version(self):
|
def test_filter_get_message_with_version(self):
|
||||||
self.check_published_message_reaches_filter_peer(self.create_message(version=10))
|
self.check_published_message_reaches_filter_peer(self.create_message(version=10))
|
||||||
|
|
||||||
@pytest.mark.xfail("nwaku" in NODE_1, reason="Bug reported: https://github.com/waku-org/nwaku/issues/2214")
|
@pytest.mark.xfail("nwaku" in NODE_1 or "nwaku" in NODE_2, reason="Bug reported: https://github.com/waku-org/nwaku/issues/2214")
|
||||||
def test_filter_get_message_with_meta(self):
|
def test_filter_get_message_with_meta(self):
|
||||||
self.check_published_message_reaches_filter_peer(self.create_message(meta=to_base64(self.test_payload)))
|
self.check_published_message_reaches_filter_peer(self.create_message(meta=to_base64(self.test_payload)))
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
from src.env_vars import NODE_1
|
from src.env_vars import NODE_1, NODE_2
|
||||||
from src.libs.custom_logger import get_custom_logger
|
from src.libs.custom_logger import get_custom_logger
|
||||||
from time import time
|
from time import time
|
||||||
from src.libs.common import delay, to_base64
|
from src.libs.common import delay, to_base64
|
||||||
|
@ -158,7 +158,7 @@ class TestRelayPublish(StepsRelay):
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "Bad Request" in str(ex)
|
assert "Bad Request" in str(ex)
|
||||||
|
|
||||||
@pytest.mark.xfail("nwaku" in NODE_1, reason="Bug reported: https://github.com/waku-org/nwaku/issues/2214")
|
@pytest.mark.xfail("nwaku" in NODE_1 or "nwaku" in NODE_2, reason="Bug reported: https://github.com/waku-org/nwaku/issues/2214")
|
||||||
def test_publish_with_valid_meta(self):
|
def test_publish_with_valid_meta(self):
|
||||||
self.check_published_message_reaches_relay_peer(self.create_message(meta=to_base64(self.test_payload)))
|
self.check_published_message_reaches_relay_peer(self.create_message(meta=to_base64(self.test_payload)))
|
||||||
|
|
||||||
|
@ -235,9 +235,7 @@ class TestRelayPublish(StepsRelay):
|
||||||
self.check_published_message_reaches_relay_peer()
|
self.check_published_message_reaches_relay_peer()
|
||||||
self.node1.restart()
|
self.node1.restart()
|
||||||
self.node1.ensure_ready()
|
self.node1.ensure_ready()
|
||||||
delay(2)
|
self.subscribe_and_publish_with_retry(self.main_nodes, [self.test_pubsub_topic])
|
||||||
self.ensure_relay_subscriptions_on_nodes(self.main_nodes, [self.test_pubsub_topic])
|
|
||||||
self.check_published_message_reaches_relay_peer()
|
|
||||||
|
|
||||||
def test_publish_after_node2_restarts(self):
|
def test_publish_after_node2_restarts(self):
|
||||||
self.check_published_message_reaches_relay_peer()
|
self.check_published_message_reaches_relay_peer()
|
||||||
|
|
Loading…
Reference in New Issue