summaryrefslogtreecommitdiff
path: root/jstests/core/dbadmin.js
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:17:50 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:18:14 -0500
commit4ae691e8edc87d0e3cfb633bb91c328426be007b (patch)
tree52079a593f54382ca13a2e741633eab1b6271893 /jstests/core/dbadmin.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/core/dbadmin.js')
-rw-r--r--jstests/core/dbadmin.js56
1 files changed, 28 insertions, 28 deletions
diff --git a/jstests/core/dbadmin.js b/jstests/core/dbadmin.js
index 94ae45d34c1..43af2df057e 100644
--- a/jstests/core/dbadmin.js
+++ b/jstests/core/dbadmin.js
@@ -1,33 +1,33 @@
load('jstests/aggregation/extras/utils.js');
(function() {
-'use strict';
-
-var t = db.dbadmin;
-t.save( { x : 1 } );
-t.save( { x : 1 } );
-
-var res = db._adminCommand( "listDatabases" );
-assert( res.databases && res.databases.length > 0 , "listDatabases 1 " + tojson(res) );
-
-var now = new Date();
-var x = db._adminCommand( "ismaster" );
-assert( x.ismaster , "ismaster failed: " + tojson( x ) );
-assert( x.localTime, "ismaster didn't include time: " + tojson(x));
-
-var localTimeSkew = x.localTime - now;
-if ( localTimeSkew >= 50 ) {
- print( "Warning: localTimeSkew " + localTimeSkew + " > 50ms." );
-}
-assert.lt( localTimeSkew, 500, "isMaster.localTime" );
-
-var before = db.runCommand( "serverStatus" );
-print(before.uptimeEstimate);
-sleep( 5000 );
-
-var after = db.runCommand( "serverStatus" );
-print(after.uptimeEstimate);
-assert.gte( after.uptimeEstimate, before.uptimeEstimate,
- "uptime estimate should be non-decreasing" );
+ 'use strict';
+
+ var t = db.dbadmin;
+ t.save({x: 1});
+ t.save({x: 1});
+
+ var res = db._adminCommand("listDatabases");
+ assert(res.databases && res.databases.length > 0, "listDatabases 1 " + tojson(res));
+
+ var now = new Date();
+ var x = db._adminCommand("ismaster");
+ assert(x.ismaster, "ismaster failed: " + tojson(x));
+ assert(x.localTime, "ismaster didn't include time: " + tojson(x));
+
+ var localTimeSkew = x.localTime - now;
+ if (localTimeSkew >= 50) {
+ print("Warning: localTimeSkew " + localTimeSkew + " > 50ms.");
+ }
+ assert.lt(localTimeSkew, 500, "isMaster.localTime");
+
+ var before = db.runCommand("serverStatus");
+ print(before.uptimeEstimate);
+ sleep(5000);
+
+ var after = db.runCommand("serverStatus");
+ print(after.uptimeEstimate);
+ assert.gte(
+ after.uptimeEstimate, before.uptimeEstimate, "uptime estimate should be non-decreasing");
})();