Adding changes to make go-waku tests pass
This commit is contained in:
parent
d3c59f3f90
commit
048e617579
|
@ -27,7 +27,7 @@ SUBNET = get_env_var("SUBNET", "172.18.0.0/16")
|
|||
IP_RANGE = get_env_var("IP_RANGE", "172.18.0.0/24")
|
||||
GATEWAY = get_env_var("GATEWAY", "172.18.0.1")
|
||||
RUNNING_IN_CI = get_env_var("CI")
|
||||
API_REQUEST_TIMEOUT = get_env_var("API_REQUEST_TIMEOUT", 20)
|
||||
API_REQUEST_TIMEOUT = get_env_var("API_REQUEST_TIMEOUT", 50)
|
||||
RLN_CREDENTIALS = get_env_var("RLN_CREDENTIALS")
|
||||
PG_USER = get_env_var("POSTGRES_USER", "postgres")
|
||||
PG_PASS = get_env_var("POSTGRES_PASSWORD", "test123")
|
||||
|
|
|
@ -179,8 +179,9 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
|
|||
self.check_published_message_reaches_relay_peer(sender=self.node1, peer_list=[self.node10], message_propagation_delay=1)
|
||||
|
||||
@pytest.mark.timeout(60 * 7)
|
||||
# @pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
|
||||
def test_filter_30_senders_1_receiver(self):
|
||||
total_senders = 30
|
||||
total_senders = 25
|
||||
node_list = []
|
||||
|
||||
logger.debug(f"Start {total_senders} nodes to publish messages ")
|
||||
|
@ -196,7 +197,9 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
|
|||
self.node31 = WakuNode(NODE_1, f"node31_{self.test_id}")
|
||||
self.node32 = WakuNode(NODE_1, f"node32_{self.test_id}")
|
||||
self.node31.start(relay="true", filter="true", store="false", discv5_bootstrap_node=node_list[total_senders - 1].get_enr_uri())
|
||||
self.node32.start(relay="false", filter="true", filternode=self.node31.get_multiaddr_with_id(), store="false")
|
||||
self.node32.start(
|
||||
relay="false", filter="true", filternode=self.node31.get_multiaddr_with_id(), store="false", discv5_bootstrap_node=self.node31
|
||||
)
|
||||
|
||||
node_list.append(self.node31)
|
||||
|
||||
|
@ -258,8 +261,9 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
|
|||
assert len(messages_response) == messages_num, f"Received messages != published which is{messages_num} !!"
|
||||
|
||||
@pytest.mark.timeout(60 * 3)
|
||||
# @pytest.mark.skipif("go-waku" in (NODE_1 + NODE_2), reason="Test works only with nwaku")
|
||||
def test_filter_many_subscribed_nodes(self):
|
||||
max_subscribed_nodes = 30
|
||||
max_subscribed_nodes = 25
|
||||
if STRESS_ENABLED:
|
||||
max_subscribed_nodes = 500
|
||||
node_list = []
|
||||
|
@ -273,13 +277,20 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
|
|||
node.set_relay_subscriptions([self.test_pubsub_topic])
|
||||
self.wait_for_autoconnection(node_list_relay, hard_wait=30)
|
||||
|
||||
node_list.append(self.node2)
|
||||
logger.debug(f"{max_subscribed_nodes} Node start and making filter requests to node2")
|
||||
for i in range(max_subscribed_nodes):
|
||||
for i in range(max_subscribed_nodes + 1):
|
||||
node_list.append(WakuNode(NODE_2, f"node{i}_{self.test_id}"))
|
||||
delay(0.1)
|
||||
node_list[i].start(relay="false", filter="true", filternode=self.node2.get_multiaddr_with_id(), store="false")
|
||||
node_list[i + 1].start(
|
||||
relay="false",
|
||||
filter="true",
|
||||
filternode=self.node2.get_multiaddr_with_id(),
|
||||
discv5_bootstrap_node=node_list[i].get_enr_uri(),
|
||||
store="false",
|
||||
)
|
||||
delay(1)
|
||||
node_list[i].set_filter_subscriptions(
|
||||
node_list[i + 1].set_filter_subscriptions(
|
||||
{"requestId": "1", "contentFilters": [self.test_content_topic], "pubsubTopic": self.test_pubsub_topic}
|
||||
)
|
||||
delay(1)
|
||||
|
@ -289,7 +300,7 @@ class TestE2E(StepsFilter, StepsStore, StepsRelay, StepsLightPush):
|
|||
delay(2)
|
||||
|
||||
logger.debug(f"{max_subscribed_nodes} Node requests the published message of subscribed filter topic")
|
||||
for i in range(max_subscribed_nodes):
|
||||
messages_response = self.get_filter_messages(self.test_content_topic, pubsub_topic=self.test_pubsub_topic, node=node_list[i])
|
||||
logger.debug(f"Response for node {i} is {messages_response}")
|
||||
for i in range(max_subscribed_nodes + 1):
|
||||
messages_response = self.get_filter_messages(self.test_content_topic, pubsub_topic=self.test_pubsub_topic, node=node_list[i + 1])
|
||||
logger.debug(f"Response for node {i+1} is {messages_response}")
|
||||
assert len(messages_response) == 1, "Received message count doesn't match sent "
|
||||
|
|
Loading…
Reference in New Issue