From ca5a9c67396ed20eddc71df45d228a8551e3fca1 Mon Sep 17 00:00:00 2001 From: SangBin Cho Date: Mon, 3 Feb 2020 16:49:03 -0800 Subject: [PATCH] Exclude test profiling info endpoint (#7030) * Skip test_profiling_info_endpoint when pytest running locally * Fixed formatting. * Fixed the reason for skipping the test based on pr comments --- python/ray/tests/test_metrics.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/ray/tests/test_metrics.py b/python/ray/tests/test_metrics.py index 6e1bf1a23..56bb05522 100644 --- a/python/ray/tests/test_metrics.py +++ b/python/ray/tests/test_metrics.py @@ -2,6 +2,7 @@ import os import json import grpc import psutil +import pytest import requests import time @@ -242,6 +243,9 @@ def test_raylet_info_endpoint(shutdown_only): time.sleep(1) +@pytest.mark.skipif( + os.environ.get("TRAVIS") is None, + reason="This test requires password-less sudo due to py-spy requirement.") def test_profiling_info_endpoint(shutdown_only): ray.init(num_cpus=1)