diff options
Diffstat (limited to 'jstests/core')
-rw-r--r-- | jstests/core/apitest_db.js | 1 | ||||
-rw-r--r-- | jstests/core/bypass_doc_validation.js | 2 | ||||
-rw-r--r-- | jstests/core/create_collection_fail_cleanup.js | 2 | ||||
-rw-r--r-- | jstests/core/create_indexes.js | 2 | ||||
-rw-r--r-- | jstests/core/dbcase.js | 4 | ||||
-rw-r--r-- | jstests/core/dbcase2.js | 4 | ||||
-rw-r--r-- | jstests/core/dbhash.js | 4 | ||||
-rw-r--r-- | jstests/core/dbhash2.js | 2 | ||||
-rw-r--r-- | jstests/core/delx.js | 4 | ||||
-rw-r--r-- | jstests/core/dropdb.js | 2 | ||||
-rw-r--r-- | jstests/core/dropdb_race.js | 2 | ||||
-rw-r--r-- | jstests/core/fsync.js | 10 | ||||
-rw-r--r-- | jstests/core/list_all_local_sessions.js | 2 | ||||
-rw-r--r-- | jstests/core/list_local_sessions.js | 2 | ||||
-rw-r--r-- | jstests/core/loadserverscripts.js | 4 | ||||
-rw-r--r-- | jstests/core/profile1.js | 2 | ||||
-rw-r--r-- | jstests/core/profile2.js | 2 | ||||
-rw-r--r-- | jstests/core/profile3.js | 2 | ||||
-rw-r--r-- | jstests/core/profile_sampling.js | 2 | ||||
-rw-r--r-- | jstests/core/startup_log.js | 4 | ||||
-rw-r--r-- | jstests/core/storefunc.js | 2 | ||||
-rw-r--r-- | jstests/core/validate_user_documents.js | 2 |
22 files changed, 31 insertions, 32 deletions
diff --git a/jstests/core/apitest_db.js b/jstests/core/apitest_db.js index 83746811184..03d82401726 100644 --- a/jstests/core/apitest_db.js +++ b/jstests/core/apitest_db.js @@ -115,5 +115,4 @@ assert.docEq({storageEngine: validStorageEngineOptions}, dd("e"); -assert.eq("foo", db.getSisterDB("foo").getName()); assert.eq("foo", db.getSiblingDB("foo").getName()); diff --git a/jstests/core/bypass_doc_validation.js b/jstests/core/bypass_doc_validation.js index 6016017bfb1..19e70019686 100644 --- a/jstests/core/bypass_doc_validation.js +++ b/jstests/core/bypass_doc_validation.js @@ -108,7 +108,7 @@ function runBypassDocumentValidationTest(validator) { // Test the mapReduce command if it is reading from a different database and collection without // validation. - const otherDb = myDb.getSisterDB("mr_second_input_db"); + const otherDb = myDb.getSiblingDB("mr_second_input_db"); const otherDbColl = otherDb.mr_second_input_coll; assert.commandWorked(otherDbColl.insert({val: 1})); outputColl.drop(); diff --git a/jstests/core/create_collection_fail_cleanup.js b/jstests/core/create_collection_fail_cleanup.js index f422d25bd88..90d636dbd3a 100644 --- a/jstests/core/create_collection_fail_cleanup.js +++ b/jstests/core/create_collection_fail_cleanup.js @@ -6,7 +6,7 @@ load("jstests/libs/fixture_helpers.js"); // For 'isMongos()'. -var dbTest = db.getSisterDB("DB_create_collection_fail_cleanup"); +var dbTest = db.getSiblingDB("DB_create_collection_fail_cleanup"); dbTest.dropDatabase(); let collectionNames = dbTest.getCollectionNames(); diff --git a/jstests/core/create_indexes.js b/jstests/core/create_indexes.js index ae005388d8a..5e3580a1f6a 100644 --- a/jstests/core/create_indexes.js +++ b/jstests/core/create_indexes.js @@ -41,7 +41,7 @@ var checkImplicitCreate = function(createIndexResult) { assert.eq(true, createIndexResult.createdCollectionAutomatically); }; -var dbTest = db.getSisterDB('create_indexes_db'); +var dbTest = db.getSiblingDB('create_indexes_db'); dbTest.dropDatabase(); // Database does not exist diff --git a/jstests/core/dbcase.js b/jstests/core/dbcase.js index bcbb103d873..73b3b34e97a 100644 --- a/jstests/core/dbcase.js +++ b/jstests/core/dbcase.js @@ -1,7 +1,7 @@ // Check db name duplication constraint SERVER-2111 -a = db.getSisterDB("dbcasetest_dbnamea"); -b = db.getSisterDB("dbcasetest_dbnameA"); +a = db.getSiblingDB("dbcasetest_dbnamea"); +b = db.getSiblingDB("dbcasetest_dbnameA"); a.dropDatabase(); b.dropDatabase(); diff --git a/jstests/core/dbcase2.js b/jstests/core/dbcase2.js index 34c0597ab05..1dff55bad6e 100644 --- a/jstests/core/dbcase2.js +++ b/jstests/core/dbcase2.js @@ -1,8 +1,8 @@ // SERVER-2111 Check that an in memory db name will block creation of a db with a similar but // differently cased name. -var dbLowerCase = db.getSisterDB("dbcase2test_dbnamea"); -var dbUpperCase = db.getSisterDB("dbcase2test_dbnameA"); +var dbLowerCase = db.getSiblingDB("dbcase2test_dbnamea"); +var dbUpperCase = db.getSiblingDB("dbcase2test_dbnameA"); var resultLower = dbLowerCase.c.insert({}); assert.eq(1, resultLower.nInserted); diff --git a/jstests/core/dbhash.js b/jstests/core/dbhash.js index eeddce74a75..47143e7d9b4 100644 --- a/jstests/core/dbhash.js +++ b/jstests/core/dbhash.js @@ -45,8 +45,8 @@ assert.neq(gh(a), gh(b), "A2"); b.insert({_id: 5}); assert.eq(gh(a), gh(b), "A3"); -dba = db.getSisterDB("dbhasha"); -dbb = db.getSisterDB("dbhashb"); +dba = db.getSiblingDB("dbhasha"); +dbb = db.getSiblingDB("dbhashb"); dba.dropDatabase(); dbb.dropDatabase(); diff --git a/jstests/core/dbhash2.js b/jstests/core/dbhash2.js index 39860cc225b..f62025b382e 100644 --- a/jstests/core/dbhash2.js +++ b/jstests/core/dbhash2.js @@ -4,7 +4,7 @@ // incompatible_with_embedded, // ] -mydb = db.getSisterDB("config"); +mydb = db.getSiblingDB("config"); t = mydb.foo; t.drop(); diff --git a/jstests/core/delx.js b/jstests/core/delx.js index a5b95d04f0e..331f6a18b67 100644 --- a/jstests/core/delx.js +++ b/jstests/core/delx.js @@ -1,7 +1,7 @@ // @tags: [assumes_against_mongod_not_mongos, requires_getmore, requires_non_retryable_writes] -a = db.getSisterDB("delxa"); -b = db.getSisterDB("delxb"); +a = db.getSiblingDB("delxa"); +b = db.getSiblingDB("delxb"); function setup(mydb) { mydb.dropDatabase(); diff --git a/jstests/core/dropdb.js b/jstests/core/dropdb.js index 1fd3fd10582..bf3c5d18b34 100644 --- a/jstests/core/dropdb.js +++ b/jstests/core/dropdb.js @@ -4,7 +4,7 @@ m = db.getMongo(); baseName = "jstests_dropdb"; -ddb = db.getSisterDB(baseName); +ddb = db.getSiblingDB(baseName); print("initial dbs: " + tojson(m.getDBNames())); diff --git a/jstests/core/dropdb_race.js b/jstests/core/dropdb_race.js index 8ec97188639..6bcd334e7ab 100644 --- a/jstests/core/dropdb_race.js +++ b/jstests/core/dropdb_race.js @@ -8,7 +8,7 @@ m = db.getMongo(); baseName = "jstests_dur_droprace"; -d = db.getSisterDB(baseName); +d = db.getSiblingDB(baseName); t = d.foo; assert(d.adminCommand({setParameter: 1, syncdelay: 5}).ok); diff --git a/jstests/core/fsync.js b/jstests/core/fsync.js index 2c721af08e9..77b247ff1f1 100644 --- a/jstests/core/fsync.js +++ b/jstests/core/fsync.js @@ -16,7 +16,7 @@ "use strict"; // Start with a clean DB. -var fsyncLockDB = db.getSisterDB('fsyncLockTestDB'); +var fsyncLockDB = db.getSiblingDB('fsyncLockTestDB'); fsyncLockDB.dropDatabase(); // Tests the db.fsyncLock/fsyncUnlock features. @@ -36,7 +36,7 @@ db.fsyncUnlock(); var resFail = fsyncLockDB.runCommand({fsync: 1, lock: 1}); // Start with a clean DB -var fsyncLockDB = db.getSisterDB('fsyncLockTestDB'); +var fsyncLockDB = db.getSiblingDB('fsyncLockTestDB'); fsyncLockDB.dropDatabase(); // Test that a single, regular write works as expected. @@ -54,7 +54,7 @@ assert(db.currentOp().fsyncLock, "Value in db.currentOp incorrect for fsyncLocke // Make sure writes are blocked. Spawn a write operation in a separate shell and make sure it // is blocked. There is really no way to do that currently, so just check that the write didn't // go through. -var writeOpHandle = startParallelShell("db.getSisterDB('fsyncLockTestDB').coll.insert({x:1});"); +var writeOpHandle = startParallelShell("db.getSiblingDB('fsyncLockTestDB').coll.insert({x:1});"); sleep(3000); // Make sure reads can still run even though there is a pending write and also that the write @@ -90,7 +90,7 @@ assert.commandWorked(currentOp); assert(currentOp.fsyncLock, "Value in db.currentOp incorrect for fsyncLocked server"); let shellHandle1 = - startParallelShell("db.getSisterDB('fsyncLockTestDB').multipleLock.insert({x:1});"); + startParallelShell("db.getSiblingDB('fsyncLockTestDB').multipleLock.insert({x:1});"); fsyncLockRes = db.fsyncLock(); assert.commandWorked(fsyncLockRes); @@ -100,7 +100,7 @@ assert.commandWorked(currentOp); assert(currentOp.fsyncLock, "Value in db.currentOp incorrect for fsyncLocked server"); let shellHandle2 = - startParallelShell("db.getSisterDB('fsyncLockTestDB').multipleLock.insert({x:1});"); + startParallelShell("db.getSiblingDB('fsyncLockTestDB').multipleLock.insert({x:1});"); sleep(3000); assert.eq(0, fsyncLockDB.multipleLock.find({}).itcount()); diff --git a/jstests/core/list_all_local_sessions.js b/jstests/core/list_all_local_sessions.js index 72226dfbb08..434e8ed660c 100644 --- a/jstests/core/list_all_local_sessions.js +++ b/jstests/core/list_all_local_sessions.js @@ -13,7 +13,7 @@ (function() { 'use strict'; -const admin = db.getSisterDB('admin'); +const admin = db.getSiblingDB('admin'); // Get current log level. let originalLogLevel = assert.commandWorked(admin.setLogLevel(1)).was.verbosity; diff --git a/jstests/core/list_local_sessions.js b/jstests/core/list_local_sessions.js index c1ba5799c96..bee5c084ca7 100644 --- a/jstests/core/list_local_sessions.js +++ b/jstests/core/list_local_sessions.js @@ -13,7 +13,7 @@ (function() { 'use strict'; -const admin = db.getSisterDB('admin'); +const admin = db.getSiblingDB('admin'); function listLocalSessions() { return admin.aggregate([{'$listLocalSessions': {allUsers: false}}]); } diff --git a/jstests/core/loadserverscripts.js b/jstests/core/loadserverscripts.js index 641a07245fe..8e491a8fc7c 100644 --- a/jstests/core/loadserverscripts.js +++ b/jstests/core/loadserverscripts.js @@ -7,7 +7,7 @@ // Test db.loadServerScripts() -var testdb = db.getSisterDB("loadserverscripts"); +var testdb = db.getSiblingDB("loadserverscripts"); jsTest.log("testing db.loadServerScripts()"); var x; @@ -52,7 +52,7 @@ assert.eq(x, "myfunc", "Checking that myfunc() returns the correct value"); // Insert value into collection from another process var coproc = - startParallelShell('db.getSisterDB("loadserverscripts").system.js.insert' + + startParallelShell('db.getSiblingDB("loadserverscripts").system.js.insert' + ' ( {_id: "myfunc2", "value": function(){ return "myfunc2"; } } );'); // wait for results coproc(); diff --git a/jstests/core/profile1.js b/jstests/core/profile1.js index 6fce5d9e74c..9d85a1e6788 100644 --- a/jstests/core/profile1.js +++ b/jstests/core/profile1.js @@ -33,7 +33,7 @@ function resetProfile(level, slowms) { // special db so that it can be run in parallel tests var stddb = db; -db = db.getSisterDB("profile1"); +db = db.getSiblingDB("profile1"); var username = "jstests_profile1_user"; db.dropUser(username); diff --git a/jstests/core/profile2.js b/jstests/core/profile2.js index d58fe533dd9..002a1ebc184 100644 --- a/jstests/core/profile2.js +++ b/jstests/core/profile2.js @@ -6,7 +6,7 @@ // sbe_incompatible, // ] -var coll = db.getSisterDB("profile2").profile2; +var coll = db.getSiblingDB("profile2").profile2; assert.commandWorked(coll.getDB().runCommand({profile: 0})); coll.drop(); diff --git a/jstests/core/profile3.js b/jstests/core/profile3.js index 5dc23bdac8b..08340991f77 100644 --- a/jstests/core/profile3.js +++ b/jstests/core/profile3.js @@ -6,7 +6,7 @@ // ] // special db so that it can be run in parallel tests var stddb = db; -var db = db.getSisterDB("profile3"); +var db = db.getSiblingDB("profile3"); db.dropAllUsers(); t = db.profile3; diff --git a/jstests/core/profile_sampling.js b/jstests/core/profile_sampling.js index 2239914cf34..78c6f182759 100644 --- a/jstests/core/profile_sampling.js +++ b/jstests/core/profile_sampling.js @@ -9,7 +9,7 @@ "use strict"; // Use a special db to support running other tests in parallel. -const profileDB = db.getSisterDB("profile_sampling"); +const profileDB = db.getSiblingDB("profile_sampling"); const coll = profileDB.profile_sampling; profileDB.dropDatabase(); diff --git a/jstests/core/startup_log.js b/jstests/core/startup_log.js index 0da9f636a3b..6f13bada629 100644 --- a/jstests/core/startup_log.js +++ b/jstests/core/startup_log.js @@ -29,11 +29,11 @@ function arrayIsSubset(smallArray, largeArray) { } // Test startup_log -var stats = db.getSisterDB("local").startup_log.stats(); +var stats = db.getSiblingDB("local").startup_log.stats(); assert(stats.capped); var latestStartUpLog = - db.getSisterDB("local").startup_log.find().sort({$natural: -1}).limit(1).next(); + db.getSiblingDB("local").startup_log.find().sort({$natural: -1}).limit(1).next(); var serverStatus = db._adminCommand("serverStatus"); var cmdLine = db._adminCommand("getCmdLineOpts").parsed; diff --git a/jstests/core/storefunc.js b/jstests/core/storefunc.js index 8f6eca7a574..4b301d64762 100644 --- a/jstests/core/storefunc.js +++ b/jstests/core/storefunc.js @@ -5,7 +5,7 @@ // ] // Use a private sister database to avoid conflicts with other tests that use system.js -var testdb = db.getSisterDB("storefunc"); +var testdb = db.getSiblingDB("storefunc"); var res; s = testdb.system.js; diff --git a/jstests/core/validate_user_documents.js b/jstests/core/validate_user_documents.js index 3ab4ef1e1fd..9e32cc2dd59 100644 --- a/jstests/core/validate_user_documents.js +++ b/jstests/core/validate_user_documents.js @@ -8,7 +8,7 @@ // Ensure that inserts and updates of the system.users collection validate the schema of inserted // documents. -mydb = db.getSisterDB("validate_user_documents"); +mydb = db.getSiblingDB("validate_user_documents"); function assertGLEOK(status) { assert(status.ok && status.err === null, "Expected OK status object; found " + tojson(status)); |