Skip to content

Commit

Permalink
SERVER-5206 Make dbadmin.js localTime check more tolerant of delay.
Browse files Browse the repository at this point in the history
  • Loading branch information
astaple committed Apr 3, 2012
1 parent b099fd4 commit 74f5cb1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jstests/dbadmin.js
Expand Up @@ -22,7 +22,11 @@ now = new Date();
x = db._adminCommand( "ismaster" );
assert( x.ismaster , "ismaster failed: " + tojson( x ) )
assert( x.localTime, "ismaster didn't include time: " + tojson(x))
assert.lt( x.localTime - now, 5, "isMaster.localTime" )
localTimeSkew = x.localTime - now
if ( localTimeSkew >= 50 ) {
print( "Warning: localTimeSkew " + localTimeSkew + " > 50ms." )
}
assert.lt( localTimeSkew, 500, "isMaster.localTime" )

before = db.runCommand( "serverStatus" )
sleep( 5000 )
Expand Down

0 comments on commit 74f5cb1

Please sign in to comment.