diff options
author | Judah Schvimer <judah@mongodb.com> | 2016-10-10 11:43:49 -0400 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2016-11-08 14:14:55 -0500 |
commit | a79c8b6455ba50d40f42bead5ce24a6093734dc3 (patch) | |
tree | 03a482da39a918155de38c815151551d88be8c61 /buildscripts/resmokelib | |
parent | 96686d8572eea8316eab9675d2dfa3dfce5b998e (diff) | |
download | mongo-a79c8b6455ba50d40f42bead5ce24a6093734dc3.tar.gz |
SERVER-26553 Log OperationFailures to test fixture in initial sync hooks
Diffstat (limited to 'buildscripts/resmokelib')
-rw-r--r-- | buildscripts/resmokelib/testing/hooks.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/buildscripts/resmokelib/testing/hooks.py b/buildscripts/resmokelib/testing/hooks.py index c5d0a1a25e0..c83e7e191d6 100644 --- a/buildscripts/resmokelib/testing/hooks.py +++ b/buildscripts/resmokelib/testing/hooks.py @@ -207,7 +207,7 @@ class BackgroundInitialSync(JsCustomBehavior): try: sync_node_conn.admin.command(cmd) except pymongo.errors.OperationFailure as err: - self.logger.exception("{0} failed".format(description)) + self.fixture.logger.exception("{0} failed".format(description)) test_report.addFailure(self.hook_test_case, sys.exc_info()) raise errors.TestFailure(err.args[0]) else: @@ -233,7 +233,7 @@ class BackgroundInitialSync(JsCustomBehavior): try: sync_node_conn.admin.command(cmd) except pymongo.errors.OperationFailure as err: - self.logger.exception("{0} failed".format(description)) + self.fixture.logger.exception("{0} failed".format(description)) test_report.addFailure(self.hook_test_case, sys.exc_info()) raise errors.TestFailure(err.args[0]) @@ -245,7 +245,7 @@ class BackgroundInitialSync(JsCustomBehavior): if state != 2: if self.tests_run == 0: msg = "Initial sync node did not catch up after waiting 20 minutes" - self.logger.exception("{0} failed: {1}".format(description, msg)) + self.fixture.logger.exception("{0} failed: {1}".format(description, msg)) test_report.addFailure(self.hook_test_case, sys.exc_info()) raise errors.TestFailure(msg) @@ -279,7 +279,7 @@ class BackgroundInitialSync(JsCustomBehavior): try: JsCustomBehavior.after_test(self, test, test_report) except errors.TestFailure as err: - self.logger.exception("{0} failed with {1}".format(description, err.args[0])) + self.fixture.logger.exception("{0} failed with {1}".format(description, err.args[0])) restart_init_sync() raise errors.TestFailure(err.args[0]) @@ -325,7 +325,7 @@ class IntermediateInitialSync(JsCustomBehavior): try: sync_node_conn.admin.command(cmd) except pymongo.errors.OperationFailure as err: - self.logger.exception("{0} failed".format(description)) + self.fixture.logger.exception("{0} failed".format(description)) test_report.addFailure(self.hook_test_case, sys.exc_info()) raise errors.TestFailure(err.args[0]) else: @@ -343,7 +343,7 @@ class IntermediateInitialSync(JsCustomBehavior): try: sync_node_conn.admin.command(cmd) except pymongo.errors.OperationFailure as err: - self.logger.exception("{0} failed".format(description)) + self.fixture.logger.exception("{0} failed".format(description)) test_report.addFailure(self.hook_test_case, sys.exc_info()) raise errors.TestFailure(err.args[0]) |