summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Guo <robert.guo@10gen.com>2016-12-13 12:11:29 -0500
committerRobert Guo <robert.guo@10gen.com>2016-12-13 18:02:41 -0500
commitb74f90afc1164e0357c5649659aeed345b5f4fcd (patch)
tree8e5bc6c0187e945752dff8f5acef80c3ef427a02
parent68c8715feaa2ead6a3c25eb9aa512de779c4795d (diff)
downloadmongo-r3.5.1.tar.gz
SERVER-26806 randomly restart initial syncr3.5.1
-rw-r--r--buildscripts/resmokelib/testing/hooks.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/buildscripts/resmokelib/testing/hooks.py b/buildscripts/resmokelib/testing/hooks.py
index 4fc187f9caf..2ad6b1b3990 100644
--- a/buildscripts/resmokelib/testing/hooks.py
+++ b/buildscripts/resmokelib/testing/hooks.py
@@ -253,11 +253,11 @@ class BackgroundInitialSync(JsCustomBehavior):
test.short_name())
# If we have not restarted initial sync since the last time we ran the data
- # validation, and if we're using resync for restarts, restart initial sync with a
- # 20% probability.
- if self.random_restarts < 1 and self.use_resync and random.random() < 0.2:
- self.fixture.logger.info(
- "Calling resync randomly in the middle of initial sync")
+ # validation, restart initial sync with a 20% probability.
+ if self.random_restarts < 1 and random.random() < 0.2:
+ hook_type = "resync" if self.use_resync else "initial sync"
+ self.fixture.logger.info("randomly restarting " + hook_type +
+ " in the middle of " + hook_type)
restart_init_sync()
self.random_restarts += 1
return