From 775374fa64ad5c712d75e5d5af7a64c78979515f Mon Sep 17 00:00:00 2001 From: wjsi Date: Sat, 18 Jun 2022 20:30:15 +0800 Subject: [PATCH] TEST --- .github/workflows/run-tests.sh | 2 +- ci/reload-env.sh | 2 +- mars/tests/test_cluster.py | 12 +++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.sh b/.github/workflows/run-tests.sh index 4fb6160626..60d57839dc 100755 --- a/.github/workflows/run-tests.sh +++ b/.github/workflows/run-tests.sh @@ -24,7 +24,7 @@ if [ -z "$NO_COMMON_TESTS" ]; then pytest $PYTEST_CONFIG mars/remote mars/storage mars/lib mars/metrics mv .coverage build/.coverage.tileable.file - pytest $PYTEST_CONFIG --forked --ignore mars/tensor --ignore mars/dataframe \ + pytest $PYTEST_CONFIG --forked -v --ignore mars/tensor --ignore mars/dataframe \ --ignore mars/learn --ignore mars/remote mars mv .coverage build/.coverage.main.file coverage combine build/ && coverage report diff --git a/ci/reload-env.sh b/ci/reload-env.sh index 7b8b26d8bd..4503e2bc95 100755 --- a/ci/reload-env.sh +++ b/ci/reload-env.sh @@ -1,7 +1,7 @@ #!/bin/bash export UNAME="$(uname | awk '{print tolower($0)}')" -export PYTEST_CONFIG_WITHOUT_COV="--log-level=DEBUG --timeout=1500 -W ignore::PendingDeprecationWarning" +export PYTEST_CONFIG_WITHOUT_COV="-p no:logging -s --timeout=1500 -W ignore::PendingDeprecationWarning" export PYTEST_CONFIG="$PYTEST_CONFIG_WITHOUT_COV --cov-config=setup.cfg --cov-report= --cov=mars" if [[ "$GITHUB_REF" =~ ^"refs/tags/" ]]; then diff --git a/mars/tests/test_cluster.py b/mars/tests/test_cluster.py index 7a352c9f35..ce21332da8 100644 --- a/mars/tests/test_cluster.py +++ b/mars/tests/test_cluster.py @@ -47,9 +47,19 @@ def _terminate(pid: int): continue +@pytest.fixture +def config_log(): + import logging + logging.basicConfig(level=logging.WARNING) + try: + yield + finally: + logging.basicConfig(level=logging.DEBUG) + + @flaky(max_runs=3) @pytest.mark.asyncio -async def test_cluster(): +async def test_cluster(config_log): port = get_next_port() web_port = get_next_port() supervisor_addr = f"127.0.0.1:{port}"