Skip to content

Commit 2bb9a7b

Browse files
committed
Test fixes and upgraded topology manager
1 parent 8f768ef commit 2bb9a7b

File tree

5 files changed

+30
-14
lines changed

5 files changed

+30
-14
lines changed

HISTORY.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2.2.17 2017-01-02
2+
-----------------
3+
* updated createCollection doc options and linked to create command.
4+
* Updated mongodb-core to 2.1.3.
5+
* Monitoring operations are re-scheduled in pool if it cannot find a connection that does not already have scheduled work on it, this is to avoid the monitoring socket timeout being applied to any existing operations on the socket due to pipelining
6+
* Moved replicaset monitoring away from serial mode and to parallel mode.
7+
* updated bson and bson-ext dependencies to 1.0.2.
8+
19
2.2.16 2016-12-13
210
-----------------
311
* NODE-899 reversed upsertedId change to bring back old behavior.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb",
3-
"version": "2.2.16",
3+
"version": "2.2.17",
44
"description": "The official MongoDB driver for Node.js",
55
"main": "index.js",
66
"repository": {
@@ -14,8 +14,7 @@
1414
],
1515
"dependencies": {
1616
"es6-promise": "3.2.1",
17-
"mongodb-core": "2.1.2",
18-
"mongodb-core": "christkv/mongodb-core#2.0",
17+
"mongodb-core": "2.1.3",
1918
"readable-stream": "2.1.5"
2019
},
2120
"devDependencies": {

test/functional/authentication_tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,7 @@ var shardedManager;
17311731

17321732
var setUpSharded = function(configuration, options, callback) {
17331733
// var ShardingManager = require('mongodb-tools').ShardingManager
1734-
var ShardingManager = require('../test_topologies').Sharded
1734+
var ShardingManager = require('../topology_test_definitions').Sharded
17351735
, Db = configuration.require.Db
17361736
, Server = configuration.require.Server
17371737
, MongoClient = configuration.require.MongoClient

test/runner.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var argv = require('optimist')
2727
// MongoDB Topology Manager
2828
var ServerManager = require('mongodb-topology-manager').Server,
2929
ReplSetManager = require('mongodb-topology-manager').ReplSet,
30-
ShardingManager = require('./test_topologies.js').Sharded;
30+
ShardingManager = require('./topology_test_definitions.js').Sharded;
3131

3232
// Skipping parameters
3333
var startupOptions = {
@@ -130,13 +130,13 @@ var Configuration = function(options) {
130130
});
131131
});
132132
}).catch(function(err) {
133-
// console.log(err.stack);
133+
console.log(err.stack);
134134
});
135135
}).catch(function(err) {
136-
// console.log(err.stack);
136+
console.log(err.stack);
137137
});
138138
}).catch(function(err) {
139-
// console.log(err.stack);
139+
console.log(err.stack);
140140
});
141141
},
142142

test/test_topologies.js renamed to test/topology_test_definitions.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,20 @@ var P = global.Promise || require('es6-promise'),
77
f = require('util').format;
88

99
var Sharded = function(options, clientOptions) {
10+
// console.log("================= ShardingManager 0")
1011
this.topology = new ShardingManager({
1112
mongod: 'mongod',
1213
mongos: 'mongos'
1314
});
1415

16+
// console.log("================= ShardingManager")
17+
// console.dir(this.topology)
18+
19+
// this.topology.on('state', function(state) {
20+
// console.log("========= received state")
21+
// console.dir(state)
22+
// })
23+
1524
// Additional options needed
1625
this.options = options || {};
1726
this.clientOptions = clientOptions || {};
@@ -25,19 +34,19 @@ Sharded.prototype.start = function(callback) {
2534
var nodes1 = [{
2635
tags: {"loc":"ny"},
2736
options: {
28-
bind_ip: 'localhost', port: 31010, dbpath: f('%s/../db/31000', __dirname)
37+
bind_ip: 'localhost', port: 31010, dbpath: f('%s/../db/31000', __dirname), shardsvr:null
2938
}
3039
}, {
3140
tags: {"loc":"sf"},
3241
options: {
33-
bind_ip: 'localhost', port: 31011, dbpath: f('%s/../db/31001', __dirname)
42+
bind_ip: 'localhost', port: 31011, dbpath: f('%s/../db/31001', __dirname), shardsvr:null
3443
}
3544
}, {
3645
// Type of node
3746
arbiter: true,
3847
// mongod process options
3948
options: {
40-
bind_ip: 'localhost', port: 31012, dbpath: f('%s/../db/31002', __dirname)
49+
bind_ip: 'localhost', port: 31012, dbpath: f('%s/../db/31002', __dirname), shardsvr:null
4150
}
4251
}];
4352

@@ -59,19 +68,19 @@ Sharded.prototype.start = function(callback) {
5968
var nodes2 = [{
6069
tags: {"loc":"ny"},
6170
options: {
62-
bind_ip: 'localhost', port: 31020, dbpath: f('%s/../db/31010', __dirname)
71+
bind_ip: 'localhost', port: 31020, dbpath: f('%s/../db/31010', __dirname), shardsvr:null
6372
}
6473
}, {
6574
tags: {"loc":"sf"},
6675
options: {
67-
bind_ip: 'localhost', port: 31021, dbpath: f('%s/../db/31011', __dirname)
76+
bind_ip: 'localhost', port: 31021, dbpath: f('%s/../db/31011', __dirname), shardsvr:null
6877
}
6978
}, {
7079
// Type of node
7180
arbiter: true,
7281
// mongod process options
7382
options: {
74-
bind_ip: 'localhost', port: 31022, dbpath: f('%s/../db/31012', __dirname)
83+
bind_ip: 'localhost', port: 31022, dbpath: f('%s/../db/31012', __dirname), shardsvr:null
7584
}
7685
}];
7786

0 commit comments

Comments
 (0)