[Tests] Fix test output (#10162)

* Trial 1.

* Fix.

* Revert "Fix."

This reverts commit 26ad970f753d581f340857be30054d6954df8255.

* Revert "Trial 1."

This reverts commit 63f7aca5162bb40f2d5e28fb9647598cbde7ad41.

* Another fix try.

* Last trial.

* Remove unnecessary comment.

* Small fix.

* Use better units.

* Lint.
This commit is contained in:
SangBin Cho 2020-08-17 21:24:20 -07:00 committed by GitHub
parent d45418936c
commit 8cedcdf2df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@ import re
import subprocess import subprocess
import sys import sys
import pytest import pytest
import ray import ray
from ray.test_utils import run_string_as_driver_nonblocking from ray.test_utils import run_string_as_driver_nonblocking
@ -53,7 +54,12 @@ def test_output():
if __name__ == "__main__": if __name__ == "__main__":
if len(sys.argv) > 1 and sys.argv[1] == "_ray_instance": if len(sys.argv) > 1 and sys.argv[1] == "_ray_instance":
ray.init(num_cpus=1) # Set object store memory very low so that it won't complain
# about low shm memory in Linux environment.
# The test failures currently complain it only has 2 GB memory,
# so let's set it much lower than that.
MB = 1000**2
ray.init(num_cpus=1, object_store_memory=(100 * MB))
ray.shutdown() ray.shutdown()
else: else:
sys.exit(pytest.main(["-v", __file__])) sys.exit(pytest.main(["-v", __file__]))