summaryrefslogtreecommitdiff
path: root/pytests
diff options
context:
space:
mode:
authorWilliam Schultz <william.schultz@mongodb.com>2018-04-04 18:01:29 -0400
committerWilliam Schultz <william.schultz@mongodb.com>2018-04-04 18:01:29 -0400
commit64eff878ebe7cce677c6bc35b2156f576336e97d (patch)
treeb70211684e0015f8835155d44f1c1fdb936d8541 /pytests
parentfd930191b98ef9f5f066881b5c88c67508fde707 (diff)
downloadmongo-64eff878ebe7cce677c6bc35b2156f576336e97d.tar.gz
Revert "SERVER-34318 Set timeout for canary insert to 1 hour in powertest.py"
This reverts commit fd930191b98ef9f5f066881b5c88c67508fde707.
Diffstat (limited to 'pytests')
-rwxr-xr-xpytests/powertest.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/pytests/powertest.py b/pytests/powertest.py
index dbf639fa13c..e724a973d0f 100755
--- a/pytests/powertest.py
+++ b/pytests/powertest.py
@@ -2224,9 +2224,6 @@ Examples:
orig_canary_doc = canary_doc = ""
validate_canary_cmd = ""
- # Set the Pymongo connection timeout to 1 hour for canary insert & validation.
- one_hour_ms = 60 * 60 * 1000
-
# The remote mongod host comes from the ssh_user_host,
# which may be specified as user@host.
ssh_user, ssh_host = get_user_host(options.ssh_user_host)
@@ -2380,10 +2377,16 @@ Examples:
# Optionally validate canary document locally.
if validate_canary_local:
- mongo = pymongo.MongoClient(**get_mongo_client_args(
- host=mongod_host, port=secret_port, serverSelectionTimeoutMS=one_hour_ms,
- socketTimeoutMS=one_hour_ms))
- ret = mongo_validate_canary(mongo, options.db_name, options.collection_name, canary_doc)
+ # Increase the Pymongo connection timeout to 1 hour.
+ one_hour_ms = 60 * 60 * 1000
+ mongo = pymongo.MongoClient(
+ **get_mongo_client_args(
+ host=mongod_host,
+ port=secret_port,
+ server_selection_timeout_ms=one_hour_ms,
+ socket_timeout_ms=one_hour_ms))
+ ret = mongo_validate_canary(
+ mongo, options.db_name, options.collection_name, canary_doc)
LOGGER.info("Local canary validation: %d", ret)
if ret:
sys.exit(ret)
@@ -2494,9 +2497,8 @@ Examples:
if options.canary:
canary_doc = {"x": time.time()}
orig_canary_doc = copy.deepcopy(canary_doc)
- mongo = pymongo.MongoClient(**get_mongo_client_args(
- host=mongod_host, port=standard_port, serverSelectionTimeoutMS=one_hour_ms,
- socketTimeoutMS=one_hour_ms))
+ mongo = pymongo.MongoClient(
+ **get_mongo_client_args(host=mongod_host, port=standard_port))
crash_canary["function"] = mongo_insert_canary
crash_canary["args"] = [
mongo,