diff --git a/ci/travis/ci.sh b/ci/travis/ci.sh index 1e236e6e0..843515400 100755 --- a/ci/travis/ci.sh +++ b/ci/travis/ci.sh @@ -139,6 +139,7 @@ test_python() { args+=( python/ray/serve/... python/ray/tests/... + -python/ray/serve:test_api # segfault on windows? https://github.com/ray-project/ray/issues/12541 -python/ray/tests:test_advanced_2 -python/ray/tests:test_advanced_3 # test_invalid_unicode_in_worker_log() fails on Windows -python/ray/tests:test_autoscaler_aws diff --git a/python/ray/serve/tests/test_api.py b/python/ray/serve/tests/test_api.py index c329d2bfa..93ea187f4 100644 --- a/python/ray/serve/tests/test_api.py +++ b/python/ray/serve/tests/test_api.py @@ -364,7 +364,16 @@ def test_delete_backend(serve_instance): client.create_backend("delete:v1", function2) client.set_traffic("delete_backend", {"delete:v1": 1.0}) - assert requests.get("http://127.0.0.1:8000/delete-backend").text == "olleh" + for _ in range(10): + try: + assert requests.get( + "http://127.0.0.1:8000/delete-backend").text == "olleh" + break + except AssertionError: + time.sleep(0.5) # wait for the traffic policy to propogate + else: + assert requests.get( + "http://127.0.0.1:8000/delete-backend").text == "olleh" @pytest.mark.parametrize("route", [None, "/delete-endpoint"])