Merge pull request #10915 from thalesmg/fvt-retry-plugin-v50
ci(fvt): add `pytest-retry` plugin
This commit is contained in:
commit
90d862cad9
|
@ -3,7 +3,7 @@ version: '3.9'
|
||||||
services:
|
services:
|
||||||
python:
|
python:
|
||||||
container_name: python
|
container_name: python
|
||||||
image: python:3.7.2-alpine3.9
|
image: python:3.9.16-alpine3.18
|
||||||
depends_on:
|
depends_on:
|
||||||
- emqx1
|
- emqx1
|
||||||
- emqx2
|
- emqx2
|
||||||
|
@ -12,4 +12,3 @@ services:
|
||||||
emqx_bridge:
|
emqx_bridge:
|
||||||
volumes:
|
volumes:
|
||||||
- ./python:/scripts
|
- ./python:/scripts
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,13 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apk update && apk add git curl
|
apk update && apk add git curl
|
||||||
git clone -b develop-4.0 https://github.com/emqx/paho.mqtt.testing.git /paho.mqtt.testing
|
git clone -b develop-5.0 https://github.com/emqx/paho.mqtt.testing.git /paho.mqtt.testing
|
||||||
pip install pytest==6.2.5
|
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=$?
|
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 + $? ))
|
RESULT=$(( RESULT + $? ))
|
||||||
|
|
||||||
# pytest -v /paho.mqtt.testing/interoperability/test_cluster --host1 "node1.emqx.io" --host2 "node2.emqx.io"
|
# pytest -v /paho.mqtt.testing/interoperability/test_cluster --host1 "node1.emqx.io" --host2 "node2.emqx.io"
|
||||||
|
|
|
@ -228,11 +228,11 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: emqx/paho.mqtt.testing
|
repository: emqx/paho.mqtt.testing
|
||||||
ref: develop-4.0
|
ref: develop-5.0
|
||||||
path: paho.mqtt.testing
|
path: paho.mqtt.testing
|
||||||
- name: install pytest
|
- name: install pytest
|
||||||
run: |
|
run: |
|
||||||
pip install pytest
|
pip install pytest==7.1.2 pytest-retry
|
||||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||||
- name: run paho test
|
- name: run paho test
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
@ -250,6 +250,6 @@ jobs:
|
||||||
sleep 10
|
sleep 10
|
||||||
done
|
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()
|
- if: failure()
|
||||||
run: kubectl logs -l "app.kubernetes.io/instance=${{ matrix.profile }}" -c emqx --tail=1000
|
run: kubectl logs -l "app.kubernetes.io/instance=${{ matrix.profile }}" -c emqx --tail=1000
|
||||||
|
|
Loading…
Reference in New Issue