From ad5790b566fddb9f7d12d96b09ad9350f25dc604 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sun, 7 Jul 2024 09:55:43 +0200 Subject: [PATCH] federation: wait for the asynchronous star to land The check races with the propagation of the star from one forge to the other. It must wait for it to land instead. --- federation/scenario-star/run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/federation/scenario-star/run.sh b/federation/scenario-star/run.sh index 2d58ca8..15db8e2 100644 --- a/federation/scenario-star/run.sh +++ b/federation/scenario-star/run.sh @@ -1,6 +1,9 @@ TMPDIR=$(mktemp -d) + trap "rm -fr $TMPDIR" EXIT +source $SCENARIO_DIR/../../lib/lib.sh + function star_count() { local curl=$1 local host_port=$2 @@ -41,4 +44,4 @@ $ONE_CURL api_json -X PUT $ONE_HOST_PORT/api/v1/user/starred/root/test # check that both repo have 1 star # star_count $ONE_CURL $ONE_HOST_PORT 1 -star_count $TWO_CURL $TWO_HOST_PORT 1 +retry star_count $TWO_CURL $TWO_HOST_PORT 1