Skip to content

Commit 7050663

Browse files
committed
minor test fix and mongo_client options validation
1 parent 39102e1 commit 7050663

File tree

2 files changed

+2
-59
lines changed

2 files changed

+2
-59
lines changed

lib/mongo_client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var validOptionNames = ['poolSize', 'ssl', 'sslValidate', 'sslCA', 'sslCert',
3636
'loggerLevel', 'logger', 'promoteValues', 'promoteBuffers', 'promoteLongs',
3737
'domainsEnabled', 'keepAliveInitialDelay', 'checkServerIdentity'];
3838
var ignoreOptionNames = ['native_parser'];
39-
var legacyOptionNames = ['server', 'replset', 'mongos', 'db'];
39+
var legacyOptionNames = ['server', 'replset', 'replSet', 'mongos', 'db'];
4040

4141
function validOptions(options) {
4242
var _validOptions = validOptionNames.concat(legacyOptionNames);

test/functional/replset_connection_tests.js

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -871,55 +871,6 @@ exports['Should Fail due to bufferMaxEntries = 0 not causing any buffering'] = {
871871
}
872872
}
873873

874-
// exports['Should correctly receive ping and ha events'] = {
875-
// metadata: { requires: { topology: 'replicaset' } },
876-
//
877-
// // The actual test we wish to run
878-
// test: function(configuration, test) {
879-
// var ReplSet = configuration.require.ReplSet
880-
// , Server = configuration.require.Server
881-
// , Db = configuration.require.Db;
882-
//
883-
// // Replica configuration
884-
// var replSet = new ReplSet([
885-
// new Server(configuration.host, configuration.port),
886-
// new Server(configuration.host, configuration.port + 1),
887-
// new Server(configuration.host, configuration.port + 2)
888-
// ],
889-
// {rs_name:configuration.replicasetName}
890-
// );
891-
//
892-
// // Open the db connection
893-
// new Db('integration_test_', replSet, {w:1}).open(function(err, db) {
894-
// test.equal(null, err)
895-
// var ha_connect = false;
896-
// var ha_ismaster = false;
897-
// var ping = false;
898-
//
899-
// // Listen to the ha and ping events
900-
// db.serverConfig.once("ha_connect", function(err) {
901-
// ha_connect = true;
902-
// });
903-
//
904-
// db.serverConfig.once("ha_ismaster", function(err, result) {
905-
// ha_ismaster = true;
906-
// });
907-
//
908-
// db.serverConfig.once("ping", function(err, r) {
909-
// ping = true;
910-
// });
911-
//
912-
// var interval = setInterval(function() {
913-
// if(ping && ha_connect && ha_ismaster) {
914-
// clearInterval(interval);
915-
// db.close();
916-
// test.done();
917-
// }
918-
// }, 100);
919-
// });
920-
// }
921-
// }
922-
923874
/**
924875
* @ignore
925876
*/
@@ -1170,7 +1121,7 @@ exports['Should Correctly remove server going into recovery mode'] = {
11701121
CoreConnection.disableConnectionAccounting();
11711122

11721123
test.done();
1173-
}, 200);
1124+
}, 1000);
11741125
}, 10000);
11751126
});
11761127
}
@@ -1464,14 +1415,6 @@ exports['Should correctly modify the server reconnectTries for all replset insta
14641415

14651416
test.done();
14661417
}, 200);
1467-
1468-
// // Connection account tests
1469-
// test.equal(0, Object.keys(CoreConnection.connections()).length);
1470-
// test.equal(0, Object.keys(CoreServer.servers()).length);
1471-
// CoreServer.disableServerAccounting();
1472-
// CoreConnection.disableConnectionAccounting();
1473-
//
1474-
// test.done();
14751418
});
14761419
}
14771420
}

0 commit comments

Comments
 (0)