From 8cedcdf2dfa913fc6748b3d7c3c6f00f679809cb Mon Sep 17 00:00:00 2001 From: SangBin Cho Date: Mon, 17 Aug 2020 21:24:20 -0700 Subject: [PATCH] [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. --- python/ray/tests/test_output.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/ray/tests/test_output.py b/python/ray/tests/test_output.py index bac20e624..edc25ae41 100644 --- a/python/ray/tests/test_output.py +++ b/python/ray/tests/test_output.py @@ -2,6 +2,7 @@ import re import subprocess import sys import pytest + import ray from ray.test_utils import run_string_as_driver_nonblocking @@ -53,7 +54,12 @@ def test_output(): if __name__ == "__main__": 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() else: sys.exit(pytest.main(["-v", __file__]))