diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4fbffe1b..78c72a80 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,7 +49,7 @@ jobs: - run: pip install -r requirements.txt - name: Run tests - run: pytest -n 5 --reruns 3 --alluredir=allure-results + run: pytest -n 4 --reruns 2 --alluredir=allure-results - name: Get allure history if: always() diff --git a/src/node/waku_node.py b/src/node/waku_node.py index c3c1d5ac..1e2519d3 100644 --- a/src/node/waku_node.py +++ b/src/node/waku_node.py @@ -1,5 +1,6 @@ import os import logging +from time import sleep from tenacity import retry, stop_after_delay, wait_fixed from src.node.api_clients.rpc import RPC from src.node.api_clients.rest import REST @@ -71,6 +72,7 @@ class WakuNode: "Started container from image %s. RPC: %s REST: %s WebSocket: %s", self._image_name, self._rpc_port, self._rest_port, self._websocket_port ) DS.waku_nodes.append(self) + sleep(1) # if we fire requests to soon after starting the node will sometimes fail to start correctly try: self.ensure_ready() except Exception as e: @@ -84,7 +86,7 @@ class WakuNode: self._container.stop() logger.debug("Container stopped.") - @retry(stop=stop_after_delay(5), wait=wait_fixed(0.05), reraise=True) + @retry(stop=stop_after_delay(10), wait=wait_fixed(0.1), reraise=True) def ensure_ready(self): self.info() logger.debug("RPC service is ready.") diff --git a/src/steps/relay.py b/src/steps/relay.py index f284f963..4bfdc7ff 100644 --- a/src/steps/relay.py +++ b/src/steps/relay.py @@ -27,7 +27,7 @@ class StepsRelay: self.node2.set_subscriptions([self.test_pubsub_topic]) @pytest.fixture(scope="function", autouse=True) - @retry(stop=stop_after_delay(40), wait=wait_fixed(1), reraise=True) + @retry(stop=stop_after_delay(120), wait=wait_fixed(1), reraise=True) def wait_for_network_to_warm_up(self): message = {"payload": to_base64(self.test_payload), "contentTopic": self.test_content_topic, "timestamp": int(time() * 1e9)} try: