Skip to content

Commit 3631ae1

Browse files
committed
2.0.35, updated to mongodb-core 1.2.2 and removed confusing warnings about c++ bson parser
1 parent 81da81a commit 3631ae1

File tree

7 files changed

+39
-29
lines changed

7 files changed

+39
-29
lines changed

HISTORY.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
2.0.35 06-17-2015
2+
-----------------
3+
- Upgraded to mongodb-core 1.2.2 including removing warnings when C++ bson parser is not available and a fix for SCRAM authentication.
4+
15
2.0.34 06-17-2015
26
-----------------
3-
- Upgraded to mongodb-core 1.2.0 speeding up serialization and removing the need for the c++ bson extension.
7+
- Upgraded to mongodb-core 1.2.1 speeding up serialization and removing the need for the c++ bson extension.
48
- NODE-486 fixed issue related to limit and skip when calling toArray in 2.0 driver.
59
- NODE-483 throw error if capabilities of topology is queries before topology has performed connection setup.
610
- NODE-482 fixed issue where MongoClient.connect would incorrectly identify a replset seed list server as a non replicaset member.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb",
3-
"version": "2.0.34",
3+
"version": "2.0.35",
44
"description": "MongoDB legacy driver emulation layer on top of mongodb-core",
55
"main": "index.js",
66
"repository": {
@@ -13,7 +13,7 @@
1313
"legacy"
1414
],
1515
"dependencies": {
16-
"mongodb-core": "1.2.0"
16+
"mongodb-core": "1.2.2"
1717
, "readable-stream": "1.0.31"
1818
},
1919
"devDependencies": {

test/benchmark.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ var run_tests = function(_tests) {
6565

6666
// console.dir(result)
6767
// Result file used for gnuplot
68-
var resultfile = result.results.map(function(x, i) {
69-
return (i + 1) + " " + x.time;
68+
var resultfile = result.results.map(function(x, i) {
69+
return (i + 1) + " " + x.time;
7070
}).join("\n");
7171

7272
// Iterate over all the items
@@ -118,8 +118,8 @@ var executeGnuPlot = function(key, dataFileName) {
118118

119119
gnuplot.on('close', function (code) {
120120
// console.log('child process exited with code ' + code);
121-
});
121+
});
122122
}
123123

124124
// Run all the tests
125-
run_tests(tests);
125+
run_tests(tests);

test/benchmarks/insert_benchmarks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ var single_100_simple_insert = function(connection_string) {
103103

104104
exports.single_doc_insert = single_doc_insert;
105105
exports.single_100_simple_insert = single_100_simple_insert;
106-
exports.single_doc_insert_journal = single_doc_insert_journal;
106+
// exports.single_doc_insert_journal = single_doc_insert_journal;

test/benchmarks/remove_benchmarks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var single_doc_remove = function(connection_string) {
1919
MongoClient.connect(connection_string, function(err, db) {
2020
if(err) return callback(err);
2121
self.db = db;
22-
var bulk = self.db.collection('single_doc_remove').initializeUnorderedBulkOp();
22+
var bulk = self.db.collection('single_doc_remove').initializeUnorderedBulkOp();
2323

2424
for(var i = 0; i < 10000; i++) {
2525
bulk.insert({a:i});

test/functional/scram_tests.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
exports['Should correctly authenticate against scram'] = {
88
metadata: { requires: { topology: 'scram', mongodb: '>=2.7.5' } },
9-
9+
1010
// The actual test we wish to run
1111
test: function(configuration, test) {
1212
var Db = configuration.require.Db
@@ -41,13 +41,19 @@ exports['Should correctly authenticate against scram'] = {
4141
db.collection('test').insert({a:1}, function(err, r) {
4242
test.equal(null, err);
4343
test.ok(r != null);
44-
45-
// Remove the user
46-
db.admin().removeUser(user, function(err, r) {
44+
45+
// Attempt to reconnect authenticating against the admin database
46+
MongoClient.connect('mongodb://test:test2@localhost:27017/test?authMechanism=SCRAM-SHA-1&authSource=admin&maxPoolSize=5', function(err, db2) {
47+
test.ok(err != null);
4748
test.equal(null, err);
4849

49-
db.close();
50-
test.done();
50+
// Remove the user
51+
db.admin().removeUser(user, function(err, r) {
52+
test.equal(null, err);
53+
54+
db.close();
55+
test.done();
56+
});
5157
});
5258
});
5359
});
@@ -59,4 +65,4 @@ exports['Should correctly authenticate against scram'] = {
5965
});
6066
});
6167
}
62-
}
68+
}

test/util.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var read_all_tests = function(directory) {
1111
}
1212

1313
var run_test = function(url, file, number_of_times, warm_up_iterations, concurrent, concurrent_batch_size, options, callback) {
14-
var final_results = {};
14+
var final_results = {};
1515
var number_of_test_to_run = 0;
1616
// Set the options
1717
if(typeof options == 'function') {
@@ -27,7 +27,7 @@ var run_test = function(url, file, number_of_times, warm_up_iterations, concurre
2727
// Load the file
2828
var _module = require(file);
2929
var test_name = options.test_name;
30-
30+
3131
// No test set run all the available tests and store the results
3232
run_file_tests(_module, Object.keys(_module), {
3333
url: url
@@ -44,7 +44,7 @@ var run_test = function(url, file, number_of_times, warm_up_iterations, concurre
4444
}
4545

4646
var run_file_tests = function(module, keys, options, callback) {
47-
if(keys.length == 0) return callback();
47+
if(keys.length == 0) return callback();
4848

4949
// Get the next key
5050
var _key = keys.shift();
@@ -65,7 +65,7 @@ var run_file_tests = function(module, keys, options, callback) {
6565
, options.warm_up_iterations
6666
, options.concurrent
6767
, options.concurrent_batch_size
68-
, function(err, results) {
68+
, function(err, results) {
6969
// Final results
7070
final_results[_key] = { results: results};
7171
if(err) { final_results[_key].err = err; }
@@ -92,7 +92,7 @@ var run_single_test = function(url, func_name, func, number_of_times, warm_up_it
9292
callback(err, test_results);
9393
})
9494
});
95-
} else {
95+
} else {
9696
// Number of batches to run
9797
var number_of_batches = number_of_times / concurrent_batch_size;
9898
// Number of items in each batch
@@ -123,23 +123,23 @@ var execute_test_batches = function(func_name, test, number_left_to_run_batch, n
123123
new function() {
124124
// Set start function
125125
var start = new Date();
126-
126+
127127
// Execute function
128128
test.test(function(err, result) {
129129
var end = new Date();
130130
var time = end.getTime() - start.getTime();
131131
results.push({start: start, end: end, time: time});
132-
132+
133133
// Adjust the number of tests to run
134134
number_left_to_run = number_left_to_run - 1;
135135
// Callback
136136
if(number_left_to_run == 0) {
137137
process.nextTick(function() {
138-
execute_test_batches(func_name, test, number_left_to_run_batch, number_of_batches - 1, results, callback);
138+
execute_test_batches(func_name, test, number_left_to_run_batch, number_of_batches - 1, results, callback);
139139
});
140140
}
141-
});
142-
}();
141+
});
142+
}();
143143
}
144144
}
145145

@@ -154,7 +154,7 @@ var exceute_test_serially = function(func_name, test, number_of_times, results,
154154
var end = new Date();
155155
var time = end.getTime() - start.getTime();
156156
results.push({start: start, end: end, time: time});
157-
157+
158158
// Execute the next tick
159159
process.nextTick(function() {
160160
exceute_test_serially(func_name, test, number_of_times - 1, results, callback);
@@ -207,7 +207,7 @@ var RunningStats = function() {
207207
RunningStats.prototype.push = function(x) {
208208
// Update the number of samples
209209
this.m_n = this.m_n + 1;
210-
210+
211211
// See Knuth TAOCP vol 2, 3rd edition, page 232
212212
if(this.m_n == 1) {
213213
this.m_oldM = this.m_newM = x;
@@ -224,4 +224,4 @@ RunningStats.prototype.push = function(x) {
224224

225225
exports.read_all_tests = read_all_tests;
226226
exports.run_test = run_test;
227-
exports.RunningStats = RunningStats;
227+
exports.RunningStats = RunningStats;

0 commit comments

Comments
 (0)