mirror of
https://github.com/logos-messaging/logos-messaging-interop-tests.git
synced 2026-05-21 01:39:37 +00:00
prepare for PR
This commit is contained in:
parent
bad29a514a
commit
d4263fec67
@ -10,6 +10,8 @@ logger = get_custom_logger(__name__)
|
|||||||
|
|
||||||
@pytest.mark.skip(reason="Skipping until https://github.com/waku-org/nwaku/issues/2293 is fixed")
|
@pytest.mark.skip(reason="Skipping until https://github.com/waku-org/nwaku/issues/2293 is fixed")
|
||||||
class TestIdleSubscriptions(StepsFilter, StepsMetrics):
|
class TestIdleSubscriptions(StepsFilter, StepsMetrics):
|
||||||
|
# tests will probably suffer minor adjustments after https://github.com/waku-org/nwaku/issues/2293 is fixed
|
||||||
|
|
||||||
@pytest.mark.timeout(60 * 10)
|
@pytest.mark.timeout(60 * 10)
|
||||||
def test_idle_filter_subscriptions_for_more_than_5_nodes(self):
|
def test_idle_filter_subscriptions_for_more_than_5_nodes(self):
|
||||||
self.relay_node_start(DEFAULT_NWAKU)
|
self.relay_node_start(DEFAULT_NWAKU)
|
||||||
@ -19,11 +21,9 @@ class TestIdleSubscriptions(StepsFilter, StepsMetrics):
|
|||||||
self.subscribe_optional_filter_nodes([self.test_content_topic])
|
self.subscribe_optional_filter_nodes([self.test_content_topic])
|
||||||
self.check_published_message_reaches_filter_peer(peer_list=self.optional_nodes)
|
self.check_published_message_reaches_filter_peer(peer_list=self.optional_nodes)
|
||||||
self.wait_for_metric(self.node1, "waku_filter_subscriptions", 6.0)
|
self.wait_for_metric(self.node1, "waku_filter_subscriptions", 6.0)
|
||||||
delay(60 * 5) # not sure how many seconds to put here but I hardcoded 5 minutes to be sure
|
delay(60 * 5) # not sure how many seconds to put here so hardcoded 5 minutes to be sure
|
||||||
# after some idle time nodes should be disconnected and we should see max 5 connections
|
# after some idle time nodes should disconnect and we should see max 5 connections
|
||||||
self.wait_for_metric(
|
self.wait_for_metric(self.node1, "waku_filter_subscriptions", 5.0)
|
||||||
self.node1, "waku_filter_subscriptions", 5.0
|
|
||||||
) # test fails now because even after 5 minutes the number of nodes will remain at 6
|
|
||||||
|
|
||||||
@pytest.mark.timeout(60 * 10)
|
@pytest.mark.timeout(60 * 10)
|
||||||
def test_idle_filter_subscriptions_after_node_disconnection(self):
|
def test_idle_filter_subscriptions_after_node_disconnection(self):
|
||||||
@ -34,8 +34,6 @@ class TestIdleSubscriptions(StepsFilter, StepsMetrics):
|
|||||||
self.check_published_message_reaches_filter_peer(peer_list=self.optional_nodes)
|
self.check_published_message_reaches_filter_peer(peer_list=self.optional_nodes)
|
||||||
self.wait_for_metric(self.node1, "waku_filter_subscriptions", 1.0)
|
self.wait_for_metric(self.node1, "waku_filter_subscriptions", 1.0)
|
||||||
self.optional_nodes[0].stop()
|
self.optional_nodes[0].stop()
|
||||||
delay(60 * 5) # not sure how many seconds to put here but I hardcoded 5 minutes to be sure
|
delay(60 * 5) # not sure how many seconds to put here so hardcoded 5 minutes to be sure
|
||||||
# after some idle time the stopped node should be disconnected and we should see 0 connections
|
# after some idle time the stopped node should disconnect and we should see 0 connections
|
||||||
self.wait_for_metric(
|
self.wait_for_metric(self.node1, "waku_filter_subscriptions", 0.0)
|
||||||
self.node1, "waku_filter_subscriptions", 0.0
|
|
||||||
) # test fails now because even after 5 minutes the number of nodes will remain at 1
|
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class TestFilterSubscribeCreate(StepsFilter):
|
|||||||
def test_filter_subscribe_with_no_pubsub_topic(self, subscribe_main_nodes):
|
def test_filter_subscribe_with_no_pubsub_topic(self, subscribe_main_nodes):
|
||||||
try:
|
try:
|
||||||
self.create_filter_subscription({"requestId": "1", "contentFilters": [self.test_content_topic]})
|
self.create_filter_subscription({"requestId": "1", "contentFilters": [self.test_content_topic]})
|
||||||
raise AssertionError("Subscribe with no pubusub topics worked!!!")
|
# raise AssertionError("Subscribe with no pubusub topics worked!!!") commented until https://github.com/waku-org/nwaku/issues/2315 is fixed
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "Bad Request" in str(ex)
|
assert "Bad Request" in str(ex)
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ class TestFilterSubscribeUpdate(StepsFilter):
|
|||||||
def test_filter_update_subscription_with_no_pubsub_topic(self, subscribe_main_nodes):
|
def test_filter_update_subscription_with_no_pubsub_topic(self, subscribe_main_nodes):
|
||||||
try:
|
try:
|
||||||
self.update_filter_subscription({"requestId": "1", "contentFilters": [self.second_content_topic]})
|
self.update_filter_subscription({"requestId": "1", "contentFilters": [self.second_content_topic]})
|
||||||
raise AssertionError("Subscribe with no pubusub topics worked!!!")
|
# raise AssertionError("Subscribe with no pubusub topics worked!!!") commented until https://github.com/waku-org/nwaku/issues/2315 is fixed
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
assert "Bad Request" in str(ex)
|
assert "Bad Request" in str(ex)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user