diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2019-07-16 07:58:24 -0400 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2019-07-16 07:58:24 -0400 |
commit | 4e4345f3e0668d425e22fbb3a6c1d064d8d8eab8 (patch) | |
tree | 92e41c89773a507c27da1a2eeac60f7ec1282525 | |
parent | 568cd28a142d93d0060710e619e67df29fa54a3d (diff) | |
download | mongo-4e4345f3e0668d425e22fbb3a6c1d064d8d8eab8.tar.gz |
SERVER-42228 Skip joining flush thread when logs are already incomplete.
(cherry picked from commit c8259b383f8e6f9ce9229774881a55c8dc41e222)
-rwxr-xr-x | buildscripts/resmoke.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/buildscripts/resmoke.py b/buildscripts/resmoke.py index 69e7b485110..cdadc15313a 100755 --- a/buildscripts/resmoke.py +++ b/buildscripts/resmoke.py @@ -228,7 +228,14 @@ class Main(object): exit_code = max(suite.return_code for suite in suites) sys.exit(exit_code) finally: - if not interrupted: + # We want to exit as quickly as possible when interrupted by a user and therefore don't + # bother waiting for all log output to be flushed to logkeeper. + # + # If we already failed to write log output to logkeeper, then we don't bother waiting + # for any remaining log output to be flushed as it'll likely fail too. Exiting without + # joining the flush thread here also means that resmoke.py won't hang due a logger from + # a fixture or a background hook not being closed. + if not interrupted and not resmokelib.logging.buildlogger.is_log_output_incomplete(): resmokelib.logging.flush.stop_thread() resmokelib.reportfile.write(suites) |