Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

SERVER-3475 debugging

  • Loading branch information...
commit 1e226c16b714e4c7e5f498d18e5d2303de61dd12 1 parent 10dd86f
@astaple astaple authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 jstests/dbhash.js
View
10 jstests/dbhash.js
@@ -14,16 +14,22 @@ db.getCollectionNames().forEach( function( x ) {
}
} );
+function dbhash( mydb ) {
+ var ret = mydb.runCommand( "dbhash" );
+ assert.commandWorked( ret, "dbhash failure" );
+ return ret;
+}
+
function gh( coll , mydb ){
if ( ! mydb ) mydb = db;
- var x = mydb.runCommand( "dbhash" ).collections[coll.getName()];
+ var x = dbhash( mydb ).collections[coll.getName()];
if ( ! x )
return "";
return x;
}
function dbh( mydb ){
- return mydb.runCommand( "dbhash" ).md5;
+ return dbhash( mydb ).md5;
}
assert.eq( gh( a ) , gh( b ) , "A1" );
Please sign in to comment.
Something went wrong with that request. Please try again.