Skip to content

Commit

Permalink
[Serve] Fix standalone3 tests (ray-project#34100) (ray-project#34135)
Browse files Browse the repository at this point in the history
environment is not inherited in Windows with subprocess, we need to explicitly inject env variables.

The reason we don't find it before is because the test is inside the standalone2.py, which is ignored for windows. 

windows passed.
```
//python/ray/serve:test_standalone3                                      PASSED in 207.6s
```
  • Loading branch information
sihanwang41 authored Apr 6, 2023
1 parent 9df81bc commit 1a3ac9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/ray/serve/tests/test_standalone3.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ def predict(self, inp):
assert ray.get(handle.predict.remote(1)) == 1
"""

run_string_as_driver(script, env={SYNC_HANDLE_IN_DAG_FEATURE_FLAG_ENV_KEY: "1"})
run_string_as_driver(
script, dict(os.environ, **{SYNC_HANDLE_IN_DAG_FEATURE_FLAG_ENV_KEY: "1"})
)


if __name__ == "__main__":
Expand Down

0 comments on commit 1a3ac9a

Please sign in to comment.