From f82e5e91864ecf2697d1dec04a3d1c294c8c4502 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 15 Aug 2019 13:29:30 -0400 Subject: [PATCH] Don't cleanup integration tests twice. --- lib/galaxy/webapps/galaxy/buildapp.py | 8 +++++--- test/base/driver_util.py | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py index 6daf8803c00..ff3695a4d3a 100644 --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -51,9 +51,11 @@ def app_factory(global_conf, load_app_kwds={}, **kwargs): except Exception: traceback.print_exc() sys.exit(1) - # Call app's shutdown method when the interpeter exits, this cleanly stops - # the various Galaxy application daemon threads - app.application_stack.register_postfork_function(atexit.register, app.shutdown) + + if kwargs.get('register_shutdown_at_exit', True): + # Call app's shutdown method when the interpeter exits, this cleanly stops + # the various Galaxy application daemon threads + app.application_stack.register_postfork_function(atexit.register, app.shutdown) # Create the universe WSGI application webapp = GalaxyWebApplication(app, session_cookie='galaxysession', name='galaxy') diff --git a/test/base/driver_util.py b/test/base/driver_util.py index 4a140ecc339..685e47552be 100644 --- a/test/base/driver_util.py +++ b/test/base/driver_util.py @@ -776,7 +776,8 @@ def launch_server(app, webapp_factory, kwargs, prefix=DEFAULT_CONFIG_PREFIX, con kwargs['global_conf'], app=app, use_translogger=False, - static_enabled=True + static_enabled=True, + register_shutdown_at_exit=False ) server, port = serve_webapp( webapp,