Skip to content

Commit

Permalink
[Dashboard][Test] Fix osx tests failures on memory profiling (ray-pro…
Browse files Browse the repository at this point in the history
…ject#42081)

Skip memory profiling osx test since memray is not installed in osx image.

Signed-off-by: Jocn2020 <jonathannitisastro@gmail.com>
  • Loading branch information
Jocn2020 authored and vickytsang committed Jan 12, 2024
1 parent 67b9276 commit 781ccd2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dashboard/modules/reporter/tests/test_profile_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ def long_run(self):
reason="This test is not supposed to work for minimal installation.",
)
@pytest.mark.skipif(sys.platform == "win32", reason="No memray on Windows.")
@pytest.mark.skipif(
sys.platform == "darwin",
reason="Fails on OSX, requires memray & lldb installed in osx image",
)
class TestMemoryProfiling:
async def test_basic_attach_profiler(self, setup_memory_profiler, shutdown_only):
# test basic attach profiler to running process
Expand Down
8 changes: 8 additions & 0 deletions dashboard/modules/reporter/tests/test_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,10 @@ def verify():
reason="This test is not supposed to work for minimal installation.",
)
@pytest.mark.skipif(sys.platform == "win32", reason="No memray on Windows.")
@pytest.mark.skipif(
sys.platform == "darwin",
reason="Fails on OSX, requires memray & lldb installed in osx image",
)
def test_get_memory_profile_running_task(shutdown_only):
"""
Verify that we can get the memory profile for a running task.
Expand Down Expand Up @@ -944,6 +948,10 @@ def verify():
reason="This test is not supposed to work for minimal installation.",
)
@pytest.mark.skipif(sys.platform == "win32", reason="No py-spy on Windows.")
@pytest.mark.skipif(
sys.platform == "darwin",
reason="Fails on OSX, requires memray & lldb installed in osx image",
)
def test_task_get_memory_profile_missing_params(shutdown_only):
"""
Verify that we throw an error for a non-running task.
Expand Down
8 changes: 8 additions & 0 deletions python/ray/tests/test_dashboard_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ def get_actor_flamegraph():
reason="This test is not supposed to work for minimal installation.",
)
@pytest.mark.skipif(sys.platform == "win32", reason="No memray on Windows.")
@pytest.mark.skipif(
sys.platform == "darwin",
reason="Fails on OSX, requires memray & lldb installed in osx image",
)
@pytest.mark.parametrize("leaks", ["0", "1"])
def test_memory_profiler_endpoint(ray_start_with_dashboard, leaks):
# Sanity check memray are installed.
Expand Down Expand Up @@ -172,6 +176,10 @@ def get_actor_memory_multiple_flamegraphs():
reason="This test is not supposed to work for minimal installation.",
)
@pytest.mark.skipif(sys.platform == "win32", reason="No py-spy on Windows.")
@pytest.mark.skipif(
sys.platform == "darwin",
reason="Fails on OSX, requires memray & lldb installed in osx image",
)
def test_profiler_failure_message(ray_start_with_dashboard):
# Sanity check py-spy and memray is installed.
subprocess.check_call(["py-spy", "--version"])
Expand Down

0 comments on commit 781ccd2

Please sign in to comment.