diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8cae2b74..70b96a06 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,8 +32,7 @@ jobs: replicas: ["1", "3"] test_cases: - { requests: 60, expected_replicas: 1 } - # remove broken test, put this back when scaling issues are solved - # - { requests: 300, expected_replicas: 2 } + - { requests: 300, expected_replicas: 2 } runs-on: ubuntu-latest name: E2E Lingo.replicas=${{ matrix.replicas }} requests=${{ matrix.test_cases.requests }} expected_replicas=${{ matrix.test_cases.expected_replicas }} steps: diff --git a/tests/e2e/test.sh b/tests/e2e/test.sh index 89924271..df94c6d5 100755 --- a/tests/e2e/test.sh +++ b/tests/e2e/test.sh @@ -104,9 +104,11 @@ until kubectl get deployment stapi-minilm-l6-v2; do sleep 1 done + +checks=$((REQUESTS / 2)) echo "Waiting for deployment to scale down back to 0 within ~2 minutes" -for i in {1..30}; do - if [ "$i" -eq 30 ]; then +for i in $(seq 1 ${checks}); do + if [ "${i}" -eq "${checks}" ]; then echo "Test failed: Expected 0 replica after not having requests for more than 1 minute, got $replicas" kubectl logs -l app=lingo --tail=-1 exit 1