summaryrefslogtreecommitdiff
path: root/buildscripts/resmokelib/testing/fixtures/interface.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/resmokelib/testing/fixtures/interface.py')
-rw-r--r--buildscripts/resmokelib/testing/fixtures/interface.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/buildscripts/resmokelib/testing/fixtures/interface.py b/buildscripts/resmokelib/testing/fixtures/interface.py
index b9b92a57a71..7eebc5071b4 100644
--- a/buildscripts/resmokelib/testing/fixtures/interface.py
+++ b/buildscripts/resmokelib/testing/fixtures/interface.py
@@ -65,7 +65,7 @@ class Fixture(object, metaclass=registry.make_registry_metaclass(_FIXTURES)):
"""Block until the fixture can be used for testing."""
pass
- def teardown(self, finished=False): # noqa
+ def teardown(self, finished=False, kill=False): # noqa
"""Destroy the fixture.
The fixture's logging handlers are closed if 'finished' is true,
@@ -76,7 +76,7 @@ class Fixture(object, metaclass=registry.make_registry_metaclass(_FIXTURES)):
"""
try:
- self._do_teardown()
+ self._do_teardown(kill=kill)
finally:
if finished:
for handler in self.logger.handlers:
@@ -84,7 +84,7 @@ class Fixture(object, metaclass=registry.make_registry_metaclass(_FIXTURES)):
# want the logs to eventually get flushed.
logging.flush.close_later(handler)
- def _do_teardown(self): # noqa
+ def _do_teardown(self, kill=False): # noqa
"""Destroy the fixture.
This method must be implemented by subclasses.
@@ -243,7 +243,7 @@ class FixtureTeardownHandler(object):
"""
return self._message
- def teardown(self, fixture, name): # noqa: D406,D407,D411,D413
+ def teardown(self, fixture, name, kill=False): # noqa: D406,D407,D411,D413
"""Tear down the given fixture and log errors instead of raising a ServerFailure exception.
Args:
@@ -254,7 +254,7 @@ class FixtureTeardownHandler(object):
"""
try:
self._logger.info("Stopping %s...", name)
- fixture.teardown()
+ fixture.teardown(kill=kill)
self._logger.info("Successfully stopped %s.", name)
return True
except errors.ServerFailure as err: