summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorMike Grundy <michael.grundy@10gen.com>2015-12-01 22:50:51 -0500
committerMike Grundy <michael.grundy@10gen.com>2015-12-01 22:51:11 -0500
commit199111365322182a7c050dbd3cea8bce08885e3f (patch)
treeda17f769a93a8018578be7617dd2a6bbdf6470c9 /buildscripts
parent72d5149270c6b3f78d0563d765075f1cfa926d66 (diff)
downloadmongo-199111365322182a7c050dbd3cea8bce08885e3f.tar.gz
SERVER-21648 resmoke.py's dbHash should compare documents with an ordered dictionary
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/resmokelib/testing/hooks.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/buildscripts/resmokelib/testing/hooks.py b/buildscripts/resmokelib/testing/hooks.py
index 2d516d0011e..dcde84e3bef 100644
--- a/buildscripts/resmokelib/testing/hooks.py
+++ b/buildscripts/resmokelib/testing/hooks.py
@@ -8,6 +8,7 @@ from __future__ import absolute_import
import os
import sys
+import bson
import pymongo
from . import fixtures
@@ -409,8 +410,10 @@ class CheckReplDBHash(CustomBehavior):
collection on the secondary, if any.
"""
- primary_coll = primary_db[coll_name]
- secondary_coll = secondary_db[coll_name]
+ codec_options = bson.CodecOptions(document_class=bson.SON)
+
+ primary_coll = primary_db.get_collection(coll_name, codec_options=codec_options)
+ secondary_coll = secondary_db.get_collection(coll_name, codec_options=codec_options)
primary_docs = CheckReplDBHash._extract_documents(primary_coll)
secondary_docs = CheckReplDBHash._extract_documents(secondary_coll)
@@ -460,6 +463,8 @@ class CheckReplDBHash(CustomBehavior):
sb.append("Mismatching document:")
sb.append(" primary: %s" % (primary_doc))
sb.append(" secondary: %s" % (secondary_doc))
+ p_idx += 1
+ s_idx += 1
# One node was missing a document. Since the documents are sorted by _id, the doc with
# the smaller _id was the one that was skipped.