Merge pull request #6786 from emqx/flaky-fvt-ci

fix(flaky_test): improve helm test preparation check
This commit is contained in:
Thales Macedo Garitezi 2022-02-03 12:28:05 -03:00 committed by GitHub
commit ac1b1b800d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -228,5 +228,17 @@ jobs:
echo "$HOME/.local/bin" >> $GITHUB_PATH echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: run paho test - name: run paho test
run: | run: |
port_connected () {
local server="$1"
local port="$2"
echo > /dev/tcp/${server}/${port} 2>/dev/null
}
kubectl port-forward service/emqx 1883:1883 > /dev/null & kubectl port-forward service/emqx 1883:1883 > /dev/null &
while ! port_connected localhost 1883; do
echo server not listening yet...
sleep 10
done
pytest -v paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host "127.0.0.1" pytest -v paho.mqtt.testing/interoperability/test_client/V5/test_connect.py -k test_basic --host "127.0.0.1"