summaryrefslogtreecommitdiff
path: root/pytests
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2018-05-25 13:47:07 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2018-05-29 15:58:19 -0400
commit1e9a55f9bba4909732ba0b06bd3547df152864bf (patch)
treef2024fac00fcb3aa5b2bcc3c8a4d5b7bfddb8d80 /pytests
parent75702981138cad992ccf4a61bbe35f9de9a2870f (diff)
downloadmongo-1e9a55f9bba4909732ba0b06bd3547df152864bf.tar.gz
SERVER-35233 Fix remote collection validation by ignoring views
Diffstat (limited to 'pytests')
-rwxr-xr-xpytests/powertest.py3
-rw-r--r--pytests/requirements.txt1
2 files changed, 3 insertions, 1 deletions
diff --git a/pytests/powertest.py b/pytests/powertest.py
index d59bbad819e..d5df5aaab3b 100755
--- a/pytests/powertest.py
+++ b/pytests/powertest.py
@@ -1503,7 +1503,8 @@ def mongo_validate_collections(mongo):
invalid_colls = []
ebusy_colls = []
for db_name in mongo.database_names():
- for coll_name in mongo[db_name].collection_names():
+ for coll in mongo[db_name].list_collections(filter={"type": "collection"}):
+ coll_name = coll["name"]
res = mongo[db_name].command({"validate": coll_name, "full": True})
LOGGER.info("Validating %s %s: %s", db_name, coll_name, res)
ebusy = "EBUSY" in res["errors"] or "EBUSY" in res["warnings"]
diff --git a/pytests/requirements.txt b/pytests/requirements.txt
index 3bb636e9613..e08ce104f66 100644
--- a/pytests/requirements.txt
+++ b/pytests/requirements.txt
@@ -1,3 +1,4 @@
# powertest
boto3 == 1.5.27
psutil == 5.4.3
+pymongo == 3.6.1