mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-34144 Powercycle output improvements:
- Correct replset name to 'powercycle' - Improve canary insert and validate output
This commit is contained in:
parent
5ae38f156c
commit
279ef03069
@ -4490,7 +4490,7 @@ tasks:
|
||||
- func: "run powercycle test"
|
||||
vars:
|
||||
<<: *powercycle_test
|
||||
mongod_extra_options: --replSet=powercyle --mongodOptions=\"--setParameter enableTestCommands=1 --storageEngine wiredTiger\"
|
||||
mongod_extra_options: --replSet=powercycle --mongodOptions=\"--setParameter enableTestCommands=1 --storageEngine wiredTiger\"
|
||||
|
||||
- name: powercycle_replication_smalloplog
|
||||
exec_timeout_secs: 7200 # 2 hour timeout for the task overall
|
||||
@ -4510,7 +4510,7 @@ tasks:
|
||||
- func: "run powercycle test"
|
||||
vars:
|
||||
<<: *powercycle_test
|
||||
mongod_extra_options: --replSet=powercyle --mongodOptions=\"--setParameter enableTestCommands=1 --oplogSize 20 --storageEngine wiredTiger\"
|
||||
mongod_extra_options: --replSet=powercycle --mongodOptions=\"--setParameter enableTestCommands=1 --oplogSize 20 --storageEngine wiredTiger\"
|
||||
|
||||
- name: powercycle_syncdelay
|
||||
exec_timeout_secs: 7200 # 2 hour timeout for the task overall
|
||||
|
@ -1508,13 +1508,15 @@ def mongo_validate_collections(mongo):
|
||||
|
||||
def mongo_validate_canary(mongo, db_name, coll_name, doc):
|
||||
"""Validate a canary document, return 0 if the document exists."""
|
||||
LOGGER.info("Validating canary document %s", doc)
|
||||
return 0 if not doc or mongo[db_name][coll_name].find_one(doc) else 1
|
||||
if not doc:
|
||||
return 0
|
||||
LOGGER.info("Validating canary document using %s.%s.find_one(%s)", db_name, coll_name, doc)
|
||||
return 0 if mongo[db_name][coll_name].find_one(doc) else 1
|
||||
|
||||
|
||||
def mongo_insert_canary(mongo, db_name, coll_name, doc):
|
||||
"""Insert a canary document with 'j' True, return 0 if successful."""
|
||||
LOGGER.info("Inserting canary document %s to DB %s Collection %s", doc, db_name, coll_name)
|
||||
LOGGER.info("Inserting canary document using %s.%s.insert_one(%s)", db_name, coll_name, doc)
|
||||
coll = mongo[db_name][coll_name].with_options(
|
||||
write_concern=pymongo.write_concern.WriteConcern(j=True))
|
||||
res = coll.insert_one(doc)
|
||||
|
Loading…
Reference in New Issue
Block a user