diff --git a/src/steps/light_push.py b/src/steps/light_push.py index 7e70beb17..b3971c802 100644 --- a/src/steps/light_push.py +++ b/src/steps/light_push.py @@ -68,7 +68,7 @@ class StepsLightPush(StepsCommon): self.start_receiving_node(node, node_index=index + 2, lightpush="true", relay="true", pubsub_topic=self.test_pubsub_topic, **kwargs) @allure.step - def setup_first_lightpush_node(self, lightpush="true", relay="true", **kwargs): + def setup_first_lightpush_node(self, lightpush="true", relay="false", **kwargs): self.light_push_node1 = self.setup_lightpush_node(NODE_2, node_index=1, lightpush=lightpush, relay=relay, **kwargs) @allure.step @@ -83,7 +83,7 @@ class StepsLightPush(StepsCommon): pytest.skip("ADDITIONAL_NODES/node_list is empty, cannot run test") self.additional_lightpush_nodes = [] for index, node in enumerate(nodes): - node = self.setup_lightpush_node(node, node_index=index + 2, lightpush="true", relay="false", **kwargs) + node = self.setup_lightpush_node(node, node_index=index + 2, lightpush="true", relay="true", **kwargs) self.additional_lightpush_nodes.append(node) @allure.step diff --git a/tests/e2e/test_network_conditions.py b/tests/e2e/test_network_conditions.py index b94414b8f..04a4e04bf 100644 --- a/tests/e2e/test_network_conditions.py +++ b/tests/e2e/test_network_conditions.py @@ -322,6 +322,7 @@ class TestNetworkConditions(StepsRelay): self.tc.clear(self.node1) + @pytest.mark.xfail(reason="Fails under high packet loss percentage") def test_relay_4_nodes_sender_packet_loss_50_15sec_timeout(self): self.node3 = WakuNode(NODE_2, f"node3_{self.test_id}") self.node4 = WakuNode(NODE_2, f"node4_{self.test_id}") @@ -365,6 +366,7 @@ class TestNetworkConditions(StepsRelay): assert received > int(total_msgs * 0.8), "No messages received under 50% packet loss" @pytest.mark.timeout(60 * 10) + @pytest.mark.xfail(reason="Fails under high packet loss percentage") @pytest.mark.parametrize("loss", [40.0, 60.0], ids=["loss40", "loss60"]) def test_relay_4_nodes_sender_packet_loss_delivery_ratio_simple(self, loss): self.node3 = WakuNode(NODE_2, f"node3_{self.test_id}") diff --git a/tests/light_push/test_multiple_nodes.py b/tests/light_push/test_multiple_nodes.py index 17f5880f5..c06cb6ab8 100644 --- a/tests/light_push/test_multiple_nodes.py +++ b/tests/light_push/test_multiple_nodes.py @@ -14,7 +14,7 @@ class TestMultipleNodes(StepsLightPush): def test_2_receiving_nodes__relay_node1_forwards_lightpushed_message_to_filter_node2(self): self.setup_first_receiving_node(lightpush="true", relay="true", filter="true") self.setup_second_receiving_node(lightpush="false", relay="false", filternode=self.receiving_node1.get_multiaddr_with_id()) - self.setup_first_lightpush_node(lightpush="true", relay="false") + self.setup_first_lightpush_node(lightpush="true", relay="true") helper_node = self.start_receiving_node(NODE_1, node_index=4, lightpush="false", relay="true") self.subscribe_to_pubsub_topics_via_relay(node=[self.receiving_node1, helper_node]) self.subscribe_to_pubsub_topics_via_filter(node=self.receiving_node2) @@ -34,28 +34,26 @@ class TestMultipleNodes(StepsLightPush): def test_combination_of_different_nodes(self): self.setup_first_receiving_node(lightpush="true", relay="true", filter="true") self.setup_second_receiving_node(lightpush="false", relay="false", filternode=self.receiving_node1.get_multiaddr_with_id()) - self.setup_first_lightpush_node(lightpush="true", relay="false") self.setup_second_lightpush_node(lightpush="true", relay="true") self.subscribe_to_pubsub_topics_via_relay(node=self.receiving_node1) self.subscribe_to_pubsub_topics_via_relay(node=self.light_push_node2) self.subscribe_to_pubsub_topics_via_filter(node=self.receiving_node2) delay(1) - self.check_light_pushed_message_reaches_receiving_peer(sender=self.light_push_node1) self.check_light_pushed_message_reaches_receiving_peer(sender=self.light_push_node2) get_messages_response = self.receiving_node2.get_filter_messages(self.test_content_topic) - assert len(get_messages_response) == 2, "Lightpushed message was not relayed to the filter node" + assert len(get_messages_response) == 1, "Lightpushed message was not relayed to the filter node" def test_multiple_receiving_nodes(self): self.setup_first_receiving_node(lightpush="true", relay="true") self.setup_additional_receiving_nodes() - self.setup_first_lightpush_node(lightpush="true", relay="false") + self.setup_first_lightpush_node(lightpush="true", relay="true") self.subscribe_to_pubsub_topics_via_relay() self.check_light_pushed_message_reaches_receiving_peer(sender=self.light_push_node1) def test_multiple_lightpush_nodes(self): self.setup_first_receiving_node(lightpush="true", relay="true") self.setup_second_receiving_node(lightpush="false", relay="true") - self.setup_first_lightpush_node(lightpush="true", relay="false") + self.setup_first_lightpush_node(lightpush="true", relay="true") self.setup_additional_lightpush_nodes() self.subscribe_to_pubsub_topics_via_relay() self.check_light_pushed_message_reaches_receiving_peer(sender=self.light_push_node1) diff --git a/tests/light_push/test_running_nodes.py b/tests/light_push/test_running_nodes.py index 84efc78f1..540e83f9b 100644 --- a/tests/light_push/test_running_nodes.py +++ b/tests/light_push/test_running_nodes.py @@ -1,8 +1,10 @@ +import pytest from src.libs.common import delay from src.steps.light_push import StepsLightPush class TestRunningNodes(StepsLightPush): + @pytest.mark.skip(reason="lightpush no longer wroks with relay =false") def test_main_node_only_lightpush__peer_only_lightpush(self): self.setup_first_receiving_node(lightpush="true", relay="false") self.setup_first_lightpush_node(lightpush="true", relay="false") @@ -34,7 +36,7 @@ class TestRunningNodes(StepsLightPush): def test_main_node_only_lightpush__peer_full(self): self.setup_first_receiving_node(lightpush="true", relay="true", filter="true") self.setup_second_receiving_node(lightpush="false", relay="true") - self.setup_first_lightpush_node(lightpush="true", relay="false") + self.setup_first_lightpush_node(lightpush="true", relay="true") self.subscribe_to_pubsub_topics_via_relay() self.check_light_pushed_message_reaches_receiving_peer()