From b20590222beddb52c8c89294ed3a324c8c7190a2 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Wed, 4 Feb 2015 21:28:52 -0500 Subject: [PATCH] 3021: In start(), if a stale server is already running (but we can't reset() it), kill it. --- sdk/python/tests/run_test_server.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py index dbad488489..ab1c7ffd1a 100644 --- a/sdk/python/tests/run_test_server.py +++ b/sdk/python/tests/run_test_server.py @@ -153,6 +153,14 @@ def run(leave_running_atexit=False): except: pass + # Before trying to start up our own server, call stop() to avoid + # "Phusion Passenger Standalone is already running on PID 12345". + # We want to kill it if it's our own _or_ it's some stale + # left-over server. But if it's been deliberately provided to us + # by a parent process, we don't want to force-kill it. That'll + # just wreck things for the next test suite that tries to use it. + stop(force=('ARVADOS_TEST_API_HOST' not in os.environ)) + restore_cwd = os.getcwd() api_src_dir = os.path.join(SERVICES_SRC_DIR, 'api') os.chdir(api_src_dir) -- 2.30.2