Merge pull request #10915 from thalesmg/fvt-retry-plugin-v50

ci(fvt): add `pytest-retry` plugin
This commit is contained in:
Thales Macedo Garitezi 2023-06-02 09:26:43 -03:00 committed by GitHub
commit 90d862cad9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 9 deletions

View File

@ -3,7 +3,7 @@ version: '3.9'
services:
python:
container_name: python
image: python:3.7.2-alpine3.9
image: python:3.9.16-alpine3.18
depends_on:
- emqx1
- emqx2
@ -12,4 +12,3 @@ services:
emqx_bridge:
volumes:
- ./python:/scripts

View File

@ -18,13 +18,13 @@ else
fi
apk update && apk add git curl
git clone -b develop-4.0 https://github.com/emqx/paho.mqtt.testing.git /paho.mqtt.testing
pip install pytest==6.2.5
git clone -b develop-5.0 https://github.com/emqx/paho.mqtt.testing.git /paho.mqtt.testing
pip install pytest==7.1.2 pytest-retry
pytest -v /paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host "$TARGET_HOST"
pytest --retries 3 -v /paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host "$TARGET_HOST"
RESULT=$?
pytest -v /paho.mqtt.testing/interoperability/test_client --host "$TARGET_HOST"
pytest --retries 3 -v /paho.mqtt.testing/interoperability/test_client --host "$TARGET_HOST"
RESULT=$(( RESULT + $? ))
# pytest -v /paho.mqtt.testing/interoperability/test_cluster --host1 "node1.emqx.io" --host2 "node2.emqx.io"

View File

@ -228,11 +228,11 @@ jobs:
- uses: actions/checkout@v3
with:
repository: emqx/paho.mqtt.testing
ref: develop-4.0
ref: develop-5.0
path: paho.mqtt.testing
- name: install pytest
run: |
pip install pytest
pip install pytest==7.1.2 pytest-retry
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: run paho test
timeout-minutes: 10
@ -250,6 +250,6 @@ jobs:
sleep 10
done
pytest -v paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host "127.0.0.1"
pytest --retries 3 -v paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host "127.0.0.1"
- if: failure()
run: kubectl logs -l "app.kubernetes.io/instance=${{ matrix.profile }}" -c emqx --tail=1000