summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@mongodb.com>2021-11-20 03:56:28 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-20 04:50:26 +0000
commit5689d7fd21958c79ab5f76aef60e08439643b1c8 (patch)
treea50988f8d113f64ee60065bb36a58845c178976c /buildscripts
parente3b5c6069197d478929449eec87f8bfcc58bc7bd (diff)
downloadmongo-5689d7fd21958c79ab5f76aef60e08439643b1c8.tar.gz
SERVER-61664 Fix test log formatting
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/resmokelib/testing/fixtures/replicaset.py6
-rw-r--r--buildscripts/resmokelib/utils/history.py4
2 files changed, 7 insertions, 3 deletions
diff --git a/buildscripts/resmokelib/testing/fixtures/replicaset.py b/buildscripts/resmokelib/testing/fixtures/replicaset.py
index 63d69b22514..5618b084e47 100644
--- a/buildscripts/resmokelib/testing/fixtures/replicaset.py
+++ b/buildscripts/resmokelib/testing/fixtures/replicaset.py
@@ -619,7 +619,7 @@ class ReplicaSetFixture(interface.ReplFixture): # pylint: disable=too-many-inst
chosen_node.mongod.wait()
self.logger.info(
- "Attempting to restart the chosen secondary on port %d of replica set '%s.",
+ "Attempting to restart the chosen secondary on port %d of replica set '%s'.",
chosen_node.port, self.replset_name)
chosen_node.setup()
@@ -640,7 +640,7 @@ class ReplicaSetFixture(interface.ReplFixture): # pylint: disable=too-many-inst
"""Try to step up the given node; return whether the attempt was successful."""
try:
self.logger.info(
- "Attempting to step up the chosen secondary on port %d of replica set '%s.",
+ "Attempting to step up the chosen secondary on port %d of replica set '%s'.",
node.port, self.replset_name)
client = interface.authenticate(node.mongo_client(), auth_options)
client.admin.command("replSetStepUp")
@@ -665,7 +665,7 @@ class ReplicaSetFixture(interface.ReplFixture): # pylint: disable=too-many-inst
chosen.mongod.wait()
- self.logger.info("Attempting to restart the old primary on port %d of replica set '%s.",
+ self.logger.info("Attempting to restart the old primary on port %d of replica set '%s'.",
chosen.port, self.replset_name)
# Restart the mongod on the old primary and wait until we can contact it again. Keep the
diff --git a/buildscripts/resmokelib/utils/history.py b/buildscripts/resmokelib/utils/history.py
index cfd7766b055..9260e7eb8ab 100644
--- a/buildscripts/resmokelib/utils/history.py
+++ b/buildscripts/resmokelib/utils/history.py
@@ -311,6 +311,10 @@ class HistoryDict(MutableMapping, Historic): # pylint: disable=too-many-ancesto
pairs.append(f"'{key}': {str(value)}")
return "{" + ", ".join(pairs) + "}"
+ def __repr__(self):
+ # eval(repr(self)) isn't valid, but this is at least useful for debugging.
+ return f'{self.__class__.__name__}({repr(self._value_store)})'
+
def _record_write(self, key, value):
written = None
if type(value) in ALLOWED_TYPES and value is not Historic: