diff --git a/src/tests/eucnc24/.gitlab-ci.yml b/src/tests/eucnc24/.gitlab-ci.yml index 0c958ec654351f9bbad263e824051bb831eb90c5..00c66e9d67607c5e7d0c6a37dfdeaa7bd5a99c15 100644 --- a/src/tests/eucnc24/.gitlab-ci.yml +++ b/src/tests/eucnc24/.gitlab-ci.yml @@ -93,13 +93,24 @@ end2end_test eucnc24: - ./deploy/tfs.sh - ./deploy/show.sh - # Wait for Context to be subscribed to NATS - - > - while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1; - sleep 1; - done - - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server + ## Wait for Context to be subscribed to NATS + ## WARNING: this loop is infinite if there is no subscriber (such as monitoring). + ## Investigate if we can use a counter to limit the number of iterations. + ## For now, keep it commented out. + #- LOOP_MAX_ATTEMPTS=180 + #- LOOP_COUNTER=0 + #- > + # while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do + # echo "Attempt: $LOOP_COUNTER" + # kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1; + # sleep 1; + # LOOP_COUNTER=$((LOOP_COUNTER + 1)) + # if [ "$LOOP_COUNTER" -ge "$LOOP_MAX_ATTEMPTS" ]; then + # echo "Max attempts reached, exiting the loop." + # break + # fi + # done + #- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server # Run end-to-end tests - >