Skip to content

Commit 81da81a

Browse files
committed
Updated history and package to 2.0.34
1 parent 62e88e4 commit 81da81a

File tree

8 files changed

+54
-34
lines changed

8 files changed

+54
-34
lines changed

HISTORY.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2.0.34 06-17-2015
2+
-----------------
3+
- Upgraded to mongodb-core 1.2.0 speeding up serialization and removing the need for the c++ bson extension.
4+
- NODE-486 fixed issue related to limit and skip when calling toArray in 2.0 driver.
5+
- NODE-483 throw error if capabilities of topology is queries before topology has performed connection setup.
6+
- NODE-482 fixed issue where MongoClient.connect would incorrectly identify a replset seed list server as a non replicaset member.
7+
- NODE-487 fixed issue where killcursor command was not being sent correctly on limit and skip queries.
8+
19
2.0.33 05-20-2015
210
-----------------
311
- Bumped mongodb-core to 1.1.32.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb",
3-
"version": "2.0.33",
3+
"version": "2.0.34",
44
"description": "MongoDB legacy driver emulation layer on top of mongodb-core",
55
"main": "index.js",
66
"repository": {
@@ -13,18 +13,18 @@
1313
"legacy"
1414
],
1515
"dependencies": {
16-
"mongodb-core": "1.1.33"
16+
"mongodb-core": "1.2.0"
1717
, "readable-stream": "1.0.31"
1818
},
1919
"devDependencies": {
2020
"integra": "0.1.8"
2121
, "optimist": "0.6.1"
22-
, "bson": "~0.3"
22+
, "bson": "~0.4"
2323
, "jsdoc": "3.3.0-beta3"
2424
, "semver": "4.1.0"
2525
, "rimraf": "2.2.6"
2626
, "gleak": "0.5.0"
27-
, "mongodb-version-manager": "^0.5.0"
27+
, "mongodb-version-manager": "^0.7.1"
2828
, "mongodb-tools": "~1.0"
2929
},
3030
"author": "Christian Kvalheim",

test/functional/crud_api_tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ exports['should correctly execute updateOne operations with w:0 and upsert'] = {
864864

865865
db.collection('try').updateOne({_id:1}, {$set:{x:1}}, {upsert:true, w:0}, function(err, r) {
866866
test.equal(null, err);
867-
test.equal(0, r.upsertedCount);
867+
test.ok(r != null);
868868

869869
db.close();
870870
test.done();

test/functional/cursor_tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,6 +1504,7 @@ exports['Should correctly execute count on cursor'] = {
15041504

15051505
// insert all docs
15061506
collection.insert(docs, configuration.writeConcernMax(), function(err, result) {
1507+
console.dir(err)
15071508
test.equal(null, err);
15081509
var total = 0;
15091510
// Create a cursor for the content

test/functional/cursorstream_tests.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports.shouldStreamDocumentsWithPauseAndResumeForFetching = {
44
metadata: { requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] } },
5-
5+
66
// The actual test we wish to run
77
test: function(configuration, test) {
88
var docs = []
@@ -49,7 +49,7 @@ exports.shouldStreamDocumentsWithPauseAndResumeForFetching = {
4949
test.equal(3000, data.length);
5050
db.close();
5151
test.done();
52-
});
52+
});
5353
}
5454
});
5555
}
@@ -60,7 +60,7 @@ exports.shouldStreamDocumentsWithPauseAndResumeForFetching = {
6060

6161
exports.shouldStream10KDocuments = {
6262
metadata: { requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] } },
63-
63+
6464
// The actual test we wish to run
6565
test: function(configuration, test) {
6666
var Binary = configuration.require.Binary;
@@ -119,7 +119,7 @@ exports.shouldStream10KDocuments = {
119119

120120
exports.shouldTriggerMassiveAmountOfGetMores = {
121121
metadata: { requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] } },
122-
122+
123123
// The actual test we wish to run
124124
test: function(configuration, test) {
125125
var Binary = configuration.require.Binary;
@@ -165,7 +165,7 @@ exports.shouldTriggerMassiveAmountOfGetMores = {
165165

166166
exports.shouldStreamDocumentsAcrossGetMoreCommandAndCountCorrectly = {
167167
metadata: { requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] } },
168-
168+
169169
// The actual test we wish to run
170170
test: function(configuration, test) {
171171
var ObjectID = configuration.require.ObjectID
@@ -186,7 +186,7 @@ exports.shouldStreamDocumentsAcrossGetMoreCommandAndCountCorrectly = {
186186

187187
var collection = db.collection('test_streaming_function_with_limit_for_fetching');
188188
var updateCollection = db.collection('test_streaming_function_with_limit_for_fetching_update');
189-
189+
190190
var left = allDocs.length;
191191
for(var i = 0; i < allDocs.length; i++) {
192192
collection.insert(allDocs[i], {w:1}, function(err, docs) {
@@ -195,9 +195,9 @@ exports.shouldStreamDocumentsAcrossGetMoreCommandAndCountCorrectly = {
195195
if(left == 0) {
196196
var cursor = collection.find({});
197197
// Execute find on all the documents
198-
var stream = cursor.stream();
198+
var stream = cursor.stream();
199199

200-
stream.on('end', function() {
200+
stream.on('end', function() {
201201
updateCollection.findOne({id:1}, function(err, doc) {
202202
test.equal(null, err);
203203
test.equal(2000, doc.count);
@@ -207,13 +207,13 @@ exports.shouldStreamDocumentsAcrossGetMoreCommandAndCountCorrectly = {
207207
})
208208
});
209209

210-
stream.on('data',function(data){
210+
stream.on('data',function(data){
211211
stream.pause();
212212

213213
updateCollection.update({id: 1}, {$inc: {count: 1}}, {w:1, upsert:true}, function(err, result) {
214214
stream.resume();
215215
});
216-
});
216+
});
217217
}
218218
});
219219
}
@@ -251,4 +251,4 @@ exports['should correctly error out stream'] = {
251251
cursor.pipe(process.stdout);
252252
});
253253
}
254-
}
254+
}

test/functional/insert_tests.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,6 @@ exports.shouldThrowErrorIfSerializingFunction = {
538538
var db = configuration.newDbInstance(configuration.writeConcernMax(), {poolSize:1});
539539
db.open(function(err, db) {
540540
var collection = db.collection('test_should_throw_error_if_serializing_function');
541-
542541
var func = function() { return 1};
543542
// Insert the update
544543
collection.insert({i:1, z:func }, {w:1, serializeFunctions:true}, function(err, result) {

test/functional/raw_tests.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
exports.shouldCorrectlySaveDocumentsAndReturnAsRaw = {
77
metadata: { requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] } },
8-
8+
99
// The actual test we wish to run
1010
test: function(configuration, test) {
1111
var Buffer = require('buffer').Buffer
@@ -23,22 +23,22 @@ exports.shouldCorrectlySaveDocumentsAndReturnAsRaw = {
2323

2424
for(var i = 0; i < items.length; i++) {
2525
test.ok(Buffer.isBuffer(items[i]));
26-
objects.push(BSON.deserialize(items[i]));
26+
objects.push(new BSON().deserialize(items[i]));
2727
}
28-
28+
2929
test.equal(1, objects[0].a);
3030
test.equal(2000, objects[1].b);
3131
test.equal(2.3, objects[2].c);
32-
32+
3333
// Execute findOne
3434
collection.findOne({a:1}, {raw:true}, function(err, item) {
3535
test.ok(Buffer.isBuffer(item));
36-
var object = BSON.deserialize(item);
37-
test.equal(1, object.a)
36+
var object = new BSON().deserialize(item);
37+
test.equal(1, object.a)
3838
db.close();
3939
test.done();
40-
})
41-
})
40+
})
41+
})
4242
})
4343
});
4444
});
@@ -50,7 +50,7 @@ exports.shouldCorrectlySaveDocumentsAndReturnAsRaw = {
5050
*/
5151
exports.shouldCorrectlySaveDocumentsAndReturnAsRawWithRawSetAtCollectionLevel = {
5252
metadata: { requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] } },
53-
53+
5454
// The actual test we wish to run
5555
test: function(configuration, test) {
5656
var Buffer = require('buffer').Buffer
@@ -67,24 +67,24 @@ exports.shouldCorrectlySaveDocumentsAndReturnAsRawWithRawSetAtCollectionLevel =
6767
var objects = [];
6868
for(var i = 0; i < items.length; i++) {
6969
test.ok(Buffer.isBuffer(items[i]));
70-
objects.push(BSON.deserialize(items[i]));
70+
objects.push(new BSON().deserialize(items[i]));
7171
}
72-
72+
7373
test.equal(1, objects[0].a);
7474
test.equal(2000, objects[1].b);
7575
test.equal(2.3, objects[2].c);
76-
76+
7777
// Execute findOne
7878
collection.findOne({a:1}, {raw:true}, function(err, item) {
7979
test.ok(Buffer.isBuffer(item));
80-
var object = BSON.deserialize(item);
81-
test.equal(1, object.a)
80+
var object = new BSON().deserialize(item);
81+
test.equal(1, object.a)
8282
db.close();
8383
test.done();
84-
})
85-
})
84+
})
85+
})
8686
})
8787
});
8888
});
8989
}
90-
}
90+
}

test/runner.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ var startupOptions = {
4848
, skip: false
4949
}
5050

51+
// var memwatch = require('memwatch');
52+
// memwatch.on('stats', function(stats) {
53+
// // do something with post-gc memory usage stats
54+
// console.log("====================== memwatch stats")
55+
// console.log(stats)
56+
// });
57+
// memwatch.on('leak', function(info) {
58+
// // do something with post-gc memory usage stats
59+
// console.log("====================== memwatch leak")
60+
// console.log(info)
61+
// })
62+
5163
/**
5264
* Standalone MongoDB Configuration
5365
*/

0 commit comments

Comments
 (0)