From b91696c6572ff3e3eaf97c8256a60bdb106e4bdb Mon Sep 17 00:00:00 2001 From: ThreadDao Date: Tue, 9 Mar 2021 11:45:45 +0800 Subject: [PATCH] Add pytest reruns Signed-off-by: ThreadDao --- build/docker/test/docker-compose.yml | 4 ++-- tests/python_test/requirements.txt | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build/docker/test/docker-compose.yml b/build/docker/test/docker-compose.yml index 8d6ebc6fe..12435be19 100644 --- a/build/docker/test/docker-compose.yml +++ b/build/docker/test/docker-compose.yml @@ -12,7 +12,7 @@ services: - ../../..:/milvus-distributed:delegated working_dir: "/milvus-distributed/tests/python_test" command: > - /bin/bash -c "sleep 10s && pytest --tags=0331 --ip proxynode" + /bin/bash -c "sleep 10s && pytest --tags=0331 --reruns=1 -n 4 --ip proxynode" networks: - milvus @@ -27,7 +27,7 @@ services: - ../../..:/milvus-distributed:delegated working_dir: "/milvus-distributed/tests/python_test" command: > - /bin/bash -c "sleep 10s && pytest --tags=0331 --ip standalone" + /bin/bash -c "sleep 10s && pytest --tags=0331 --reruns=1 -n 4 --ip standalone" networks: - milvus diff --git a/tests/python_test/requirements.txt b/tests/python_test/requirements.txt index 5f4c1c8be..cebcd44ec 100644 --- a/tests/python_test/requirements.txt +++ b/tests/python_test/requirements.txt @@ -4,11 +4,12 @@ numpy==1.18.1 pytest-cov==2.8.1 pymilvus-distributed==0.0.39 sklearn==0.0 -pytest==4.5.0 +pytest==6.2.2 pytest-timeout==1.3.3 pytest-repeat==0.8.0 allure-pytest==2.7.0 pytest-print==0.1.2 pytest-level==0.1.1 -pytest-xdist==1.23.2 +pytest-xdist==2.2.1 +pytest-rerunfailures==9.1.1 git+https://gitee.com/quicksilver/pytest-tags.git -- GitLab