Skip to content

Commit 58d6fc7

Browse files
committed
minor test fixes for generators
1 parent be47c1d commit 58d6fc7

File tree

2 files changed

+68
-103
lines changed

2 files changed

+68
-103
lines changed

test/functional/operation_generators_example_tests.js

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ exports.aggregationExample2WithGenerators = {
4646
]}];
4747

4848
// Create a collection
49-
var collection = db.collection('aggregationExample2_with_generators');
49+
var collection = db.collection('aggregationExample2_with_generatorsGenerator');
5050

5151
// Insert the docs
5252
yield collection.insertMany(docs, {w: 1});
@@ -111,7 +111,7 @@ exports['Aggregation Cursor next Test with Generators'] = {
111111
]}];
112112

113113
// Create a collection
114-
var collection = db.collection('aggregation_next_example_with_generators');
114+
var collection = db.collection('aggregation_next_example_with_generatorsGenerator');
115115

116116
// Insert the docs
117117
yield collection.insertMany(docs, {w: 1});
@@ -2703,41 +2703,6 @@ exports.shouldCorrectlyDefineSystemLevelFunctionAndExecuteFunctionWithGenerators
27032703
}
27042704
}
27052705

2706-
/**
2707-
* An example of a simple single server db connection and close function using a Generator and the co module.
2708-
*
2709-
* @example-class Db
2710-
* @example-method close
2711-
* @ignore
2712-
*/
2713-
exports.shouldCorrectlyOpenASimpleDbSingleServerConnectionAndCloseWithCallbackWithGenerators = {
2714-
metadata: { requires: { generators:true, topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] } },
2715-
2716-
// The actual test we wish to run
2717-
test: function(configuration, test) {
2718-
var co = require('co');
2719-
2720-
co(function*() {
2721-
// Connect
2722-
var db = yield configuration.newDbInstance({w:1}, {poolSize:1}).open();
2723-
// LINE var MongoClient = require('mongodb').MongoClient,
2724-
// LINE co = require('co');
2725-
// LINE test = require('assert');
2726-
// LINE
2727-
// LINE co(function*() {
2728-
// LINE var db = yield MongoClient.connect('mongodb://localhost:27017/test');
2729-
// REPLACE configuration.writeConcernMax() WITH {w:1}
2730-
// REMOVE-LINE test.done();
2731-
// BEGIN
2732-
2733-
// Close the connection with a callback that is optional
2734-
var result = yield db.close();
2735-
test.done();
2736-
});
2737-
// END
2738-
}
2739-
}
2740-
27412706
/**
27422707
* An example of retrieving the collections list for a database using a Generator and the co module.
27432708
*
@@ -2765,7 +2730,7 @@ exports.shouldCorrectlyRetrievelistCollectionsWithGenerators = {
27652730
// REMOVE-LINE test.done();
27662731
// BEGIN
27672732
// Get an empty db
2768-
var db1 = db.db('listCollectionTestDb2');
2733+
var db1 = db.db('listCollectionTestDb2Generator');
27692734
// Create a collection
27702735
var collection = db1.collection('shouldCorrectlyRetrievelistCollections_with_generators');
27712736
// Ensure the collection was created

test/runner.js

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ var startupOptions = {
4242
, skip: false
4343
}
4444

45-
// // Skipping parameters
46-
// var startupOptions = {
47-
// skipStartup: false
48-
// , skipRestart: false
49-
// , skipShutdown: false
50-
// , skip: false
51-
// }
45+
// Skipping parameters
46+
var startupOptions = {
47+
skipStartup: false
48+
, skipRestart: false
49+
, skipShutdown: false
50+
, skip: false
51+
}
5252

5353
/**
5454
* Standalone MongoDB Configuration
@@ -217,75 +217,75 @@ var runner = new Runner({
217217
});
218218

219219
var testFiles =[
220-
// '/test/functional/mongo_client_tests.js'
221-
// , '/test/functional/collection_tests.js'
222-
// , '/test/functional/db_tests.js'
223-
// , '/test/functional/cursor_tests.js'
224-
// , '/test/functional/insert_tests.js'
225-
// , '/test/functional/aggregation_tests.js'
226-
// , '/test/functional/admin_tests.js'
227-
// , '/test/functional/connection_tests.js'
228-
// , '/test/functional/cursorstream_tests.js'
229-
// , '/test/functional/custom_pk_tests.js'
230-
// , '/test/functional/domain_tests.js'
231-
// , '/test/functional/error_tests.js'
232-
// , '/test/functional/find_tests.js'
233-
// , '/test/functional/index_tests.js'
234-
// , '/test/functional/mapreduce_tests.js'
235-
// , '/test/functional/maxtimems_tests.js'
236-
// , '/test/functional/multiple_db_tests.js'
237-
// , '/test/functional/object_id_tests.js'
238-
// , '/test/functional/raw_tests.js'
239-
// , '/test/functional/readpreference_tests.js'
240-
// , '/test/functional/remove_tests.js'
241-
// , '/test/functional/unicode_tests.js'
242-
// , '/test/functional/uri_tests.js'
243-
// , '/test/functional/url_parser_tests.js'
244-
// , '/test/functional/gridfs_tests.js'
245-
// , '/test/functional/bulk_tests.js'
246-
// , '/test/functional/operation_example_tests.js'
247-
// , '/test/functional/crud_api_tests.js'
248-
// , '/test/functional/reconnect_tests.js'
249-
250-
// // Promise tests
251-
// , '/test/functional/promises_db_tests.js'
252-
// , '/test/functional/promises_collection_tests.js'
253-
// , '/test/functional/promises_cursor_tests.js'
254-
// , '/test/functional/operation_promises_example_tests.js'
220+
'/test/functional/mongo_client_tests.js'
221+
, '/test/functional/collection_tests.js'
222+
, '/test/functional/db_tests.js'
223+
, '/test/functional/cursor_tests.js'
224+
, '/test/functional/insert_tests.js'
225+
, '/test/functional/aggregation_tests.js'
226+
, '/test/functional/admin_tests.js'
227+
, '/test/functional/connection_tests.js'
228+
, '/test/functional/cursorstream_tests.js'
229+
, '/test/functional/custom_pk_tests.js'
230+
, '/test/functional/domain_tests.js'
231+
, '/test/functional/error_tests.js'
232+
, '/test/functional/find_tests.js'
233+
, '/test/functional/index_tests.js'
234+
, '/test/functional/mapreduce_tests.js'
235+
, '/test/functional/maxtimems_tests.js'
236+
, '/test/functional/multiple_db_tests.js'
237+
, '/test/functional/object_id_tests.js'
238+
, '/test/functional/raw_tests.js'
239+
, '/test/functional/readpreference_tests.js'
240+
, '/test/functional/remove_tests.js'
241+
, '/test/functional/unicode_tests.js'
242+
, '/test/functional/uri_tests.js'
243+
, '/test/functional/url_parser_tests.js'
244+
, '/test/functional/gridfs_tests.js'
245+
, '/test/functional/bulk_tests.js'
246+
, '/test/functional/operation_example_tests.js'
247+
, '/test/functional/crud_api_tests.js'
248+
, '/test/functional/reconnect_tests.js'
249+
250+
// Promise tests
251+
, '/test/functional/promises_db_tests.js'
252+
, '/test/functional/promises_collection_tests.js'
253+
, '/test/functional/promises_cursor_tests.js'
254+
, '/test/functional/operation_promises_example_tests.js'
255255

256256
// Generator tests
257257
, '/test/functional/operation_generators_example_tests.js'
258258

259-
// // Logging tests
260-
// , '/test/functional/logger_tests.js'
259+
// Logging tests
260+
, '/test/functional/logger_tests.js'
261261

262-
// // Replicaset tests
263-
// , '/test/functional/replset_operations_tests.js'
264-
// , '/test/functional/replset_read_preference_tests.js'
265-
// , '/test/functional/replset_failover_tests.js'
266-
// , '/test/functional/replset_connection_tests.js'
262+
// Replicaset tests
263+
, '/test/functional/replset_operations_tests.js'
264+
, '/test/functional/replset_read_preference_tests.js'
265+
, '/test/functional/replset_failover_tests.js'
266+
, '/test/functional/replset_connection_tests.js'
267267

268-
// // Sharding tests
269-
// , '/test/functional/sharding_failover_tests.js'
270-
// , '/test/functional/sharding_connection_tests.js'
271-
// , '/test/functional/sharding_read_preference_tests.js'
268+
// Sharding tests
269+
, '/test/functional/sharding_failover_tests.js'
270+
, '/test/functional/sharding_connection_tests.js'
271+
, '/test/functional/sharding_read_preference_tests.js'
272272

273-
// // SSL tests
274-
// , '/test/functional/ssl_mongoclient_tests.js'
275-
// , '/test/functional/ssl_validation_tests.js'
276-
// , '/test/functional/ssl_x509_connect_tests.js'
273+
// SSL tests
274+
, '/test/functional/ssl_mongoclient_tests.js'
275+
, '/test/functional/ssl_validation_tests.js'
276+
, '/test/functional/ssl_x509_connect_tests.js'
277277

278-
// // SCRAM tests
279-
// , '/test/functional/scram_tests.js'
278+
// SCRAM tests
279+
, '/test/functional/scram_tests.js'
280280

281-
// // LDAP Tests
282-
// , '/test/functional/ldap_tests.js'
281+
// LDAP Tests
282+
, '/test/functional/ldap_tests.js'
283283

284-
// // Kerberos Tests
285-
// , '/test/functional/kerberos_tests.js'
284+
// Kerberos Tests
285+
, '/test/functional/kerberos_tests.js'
286286

287-
// // Authentication Tests
288-
// , '/test/functional/authentication_tests.js'
287+
// Authentication Tests
288+
, '/test/functional/authentication_tests.js'
289289
]
290290

291291
// Add all the tests to run

0 commit comments

Comments
 (0)