mirror of
https://github.com/wassname/ray.git
synced 2026-08-11 11:24:51 +08:00
Deflake Serve tests (#12542)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user