From 96bebd9021429ec4536db5bba9b021a99dd70ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Krzysztof=20Rekucki?= Date: Wed, 17 Jul 2024 01:15:48 +0200 Subject: [PATCH] build: wait for 6 providers --- .github/actions/prepare-tests/action.yml | 2 +- tests/docker/docker-compose.yml | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/actions/prepare-tests/action.yml b/.github/actions/prepare-tests/action.yml index 70ee0abc8..57b35e071 100644 --- a/.github/actions/prepare-tests/action.yml +++ b/.github/actions/prepare-tests/action.yml @@ -63,7 +63,7 @@ runs: - name: Run a preliminary scan of offers shell: bash run: | - docker exec -t docker-requestor-1 /bin/sh -c "npx --no-progress --yes @golem-sdk/cli market scan -k try_golem --subnet-tag $YAGNA_SUBNET --payment-network $PAYMENT_NETWORK" + docker exec -t docker-requestor-1 /bin/sh -c "npx --yes --no-progress @prekucki/wait-for-n -- --limit=6 --appkey=try_golem --subnet=$YAGNA_SUBNET" - name: List down sessions seen on that requestor shell: bash diff --git a/tests/docker/docker-compose.yml b/tests/docker/docker-compose.yml index 74541bae9..a41a888d5 100644 --- a/tests/docker/docker-compose.yml +++ b/tests/docker/docker-compose.yml @@ -7,7 +7,7 @@ services: image: provider:latest restart: always deploy: - replicas: 12 + replicas: 6 volumes: - /etc/localtime:/etc/localtime:ro - /root/.local/share/yagna/ @@ -20,9 +20,11 @@ services: retries: 1 start_period: 40s environment: - - YA_NET_BROADCAST_SIZE=30 + - YA_NET_BROADCAST_SIZE=10 - NODE_NAME=provider-1 - SUBNET=${YAGNA_SUBNET:-golemjstest} + - YA_NET_BIND_URL=udp://0.0.0.0:0 + - YA_NET_RELAY_HOST=63.34.24.27:7477 provider-2: build: context: . @@ -30,7 +32,7 @@ services: image: provider:latest restart: always deploy: - replicas: 12 + replicas: 6 volumes: - /etc/localtime:/etc/localtime:ro - /root/.local/share/yagna/ @@ -43,9 +45,11 @@ services: retries: 1 start_period: 40s environment: - - YA_NET_BROADCAST_SIZE=30 + - YA_NET_BROADCAST_SIZE=10 - NODE_NAME=provider-2 - SUBNET=${YAGNA_SUBNET:-golemjstest} + - YA_NET_BIND_URL=udp://0.0.0.0:0 + - YA_NET_RELAY_HOST=63.34.24.27:7477 requestor: build: context: . @@ -57,14 +61,15 @@ services: - /root/.local/share/yagna/ - ../../:/golem-js environment: - - YA_NET_BROADCAST_SIZE=30 + - YA_NET_BROADCAST_SIZE=10 - YAGNA_AUTOCONF_APPKEY=try_golem - YAGNA_API_URL=http://0.0.0.0:7465 - GSB_URL=tcp://0.0.0.0:7464 - YAGNA_SUBNET=${YAGNA_SUBNET:-golemjstest} - YAGNA_APPKEY=try_golem - PAYMENT_NETWORK=${PAYMENT_NETWORK} - + - YA_NET_BIND_URL=udp://0.0.0.0:0 + - YA_NET_RELAY_HOST=63.34.24.27:7477 healthcheck: test: ["CMD-SHELL", "curl -s -o /dev/null -w '%{http_code}' http://localhost:7465 | grep -q 401"] interval: 10s