5
5
*/
6
6
exports . shouldCorrectlyHandleIllegalDbNames = {
7
7
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
8
-
8
+
9
9
// The actual test we wish to run
10
10
test : function ( configuration , test ) {
11
11
var Db = configuration . require . Db ;
@@ -64,7 +64,7 @@ exports.shouldCorrectlyHandleIllegalDbNames = {
64
64
*/
65
65
exports . shouldCorrectlyPerformAutomaticConnect = {
66
66
metadata : { requires : { topology : 'single' } } ,
67
-
67
+
68
68
// The actual test we wish to run
69
69
test : function ( configuration , test ) {
70
70
var automatic_connect_client = configuration . newDbInstance ( configuration . writeConcernMax ( ) , { poolSize :1 , auto_reconnect :true } ) ;
@@ -100,7 +100,7 @@ exports.shouldCorrectlyPerformAutomaticConnect = {
100
100
*/
101
101
exports . shouldCorrectlyPerformAutomaticConnectWithMaxBufferSize0 = {
102
102
metadata : { requires : { topology : 'single' } } ,
103
-
103
+
104
104
// The actual test we wish to run
105
105
test : function ( configuration , test ) {
106
106
var automatic_connect_client = configuration . newDbInstance ( { w :1 , bufferMaxEntries :0 } , { poolSize :1 , auto_reconnect :true } ) ;
@@ -132,7 +132,7 @@ exports.shouldCorrectlyPerformAutomaticConnectWithMaxBufferSize0 = {
132
132
*/
133
133
exports . shouldCorrectlyHandleFailedConnection = {
134
134
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
135
-
135
+
136
136
// The actual test we wish to run
137
137
test : function ( configuration , test ) {
138
138
var Db = configuration . require . Db
@@ -150,7 +150,7 @@ exports.shouldCorrectlyHandleFailedConnection = {
150
150
*/
151
151
exports . shouldCorrectlyResaveDBRef = {
152
152
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
153
-
153
+
154
154
// The actual test we wish to run
155
155
test : function ( configuration , test ) {
156
156
var DBRef = configuration . require . DBRef ;
@@ -203,7 +203,7 @@ exports.shouldCorrectlyForceReindexOnCollection = {
203
203
metadata : {
204
204
requires : { topology : [ "single" , "replicaset" ] }
205
205
} ,
206
-
206
+
207
207
// The actual test we wish to run
208
208
test : function ( configuration , test ) {
209
209
var db = configuration . newDbInstance ( configuration . writeConcernMax ( ) , { poolSize :1 , auto_reconnect :false } ) ;
@@ -253,7 +253,7 @@ exports.shouldCorrectlyForceReindexOnCollection = {
253
253
*/
254
254
exports . shouldCorrectlyGetErrorDroppingNonExistingDb = {
255
255
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
256
-
256
+
257
257
// The actual test we wish to run
258
258
test : function ( configuration , test ) {
259
259
var db = configuration . newDbInstance ( configuration . writeConcernMax ( ) , { poolSize :1 , auto_reconnect :false } ) ;
@@ -278,7 +278,7 @@ exports.shouldCorrectlyGetErrorDroppingNonExistingDb = {
278
278
*/
279
279
exports . shouldCorrectlyThrowWhenTryingToReOpenConnection = {
280
280
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
281
-
281
+
282
282
// The actual test we wish to run
283
283
test : function ( configuration , test ) {
284
284
var db = configuration . newDbInstance ( configuration . writeConcernMax ( ) , { poolSize :1 , auto_reconnect :false } ) ;
@@ -302,7 +302,7 @@ exports.shouldCorrectlyThrowWhenTryingToReOpenConnection = {
302
302
*/
303
303
exports . shouldCorrectlyReconnectWhenError = {
304
304
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
305
-
305
+
306
306
// The actual test we wish to run
307
307
test : function ( configuration , test ) {
308
308
var Db = configuration . require . Db
@@ -328,7 +328,7 @@ exports.shouldCorrectlyReconnectWhenError = {
328
328
*/
329
329
exports . shouldCorrectlyUseCursorWithListCollectionsCommand = {
330
330
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
331
-
331
+
332
332
// The actual test we wish to run
333
333
test : function ( configuration , test ) {
334
334
var Db = configuration . require . Db
@@ -349,7 +349,7 @@ exports.shouldCorrectlyUseCursorWithListCollectionsCommand = {
349
349
// Create a collection
350
350
db1 . collection ( 'test1' ) . insertOne ( { a :1 } , function ( ) {
351
351
test . equal ( null , err ) ;
352
-
352
+
353
353
// Get listCollections filtering out the name
354
354
var cursor = db1 . listCollections ( { name : 'test1' } ) ;
355
355
cursor . toArray ( function ( err , names ) {
@@ -370,7 +370,7 @@ exports.shouldCorrectlyUseCursorWithListCollectionsCommand = {
370
370
*/
371
371
exports . shouldCorrectlyUseCursorWithListCollectionsCommandAndBatchSize = {
372
372
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
373
-
373
+
374
374
// The actual test we wish to run
375
375
test : function ( configuration , test ) {
376
376
var Db = configuration . require . Db
@@ -391,7 +391,7 @@ exports.shouldCorrectlyUseCursorWithListCollectionsCommandAndBatchSize = {
391
391
// Create a collection
392
392
db1 . collection ( 'test1' ) . insertOne ( { a :1 } , function ( ) {
393
393
test . equal ( null , err ) ;
394
-
394
+
395
395
// Get listCollections filtering out the name
396
396
var cursor = db1 . listCollections ( { name : 'test' } , { batchSize :1 } ) ;
397
397
cursor . toArray ( function ( err , names ) {
@@ -412,7 +412,7 @@ exports.shouldCorrectlyUseCursorWithListCollectionsCommandAndBatchSize = {
412
412
*/
413
413
exports [ 'should correctly list collection names with . in the middle' ] = {
414
414
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
415
-
415
+
416
416
// The actual test we wish to run
417
417
test : function ( configuration , test ) {
418
418
var Db = configuration . require . Db
@@ -433,7 +433,7 @@ exports['should correctly list collection names with . in the middle'] = {
433
433
// Create a collection
434
434
db1 . collection ( 'test.collection2' ) . insertOne ( { a :1 } , function ( ) {
435
435
test . equal ( null , err ) ;
436
-
436
+
437
437
// Get listCollections filtering out the name
438
438
var cursor = db1 . listCollections ( { name : / t e s t .c o l l e c t i o n / } ) ;
439
439
cursor . toArray ( function ( err , names ) {
@@ -460,11 +460,11 @@ exports['should correctly list collection names with . in the middle'] = {
460
460
* @ignore
461
461
*/
462
462
exports [ 'should correctly list collection names with batchSize 1 for 2.8 or higher' ] = {
463
- metadata : { requires : {
464
- topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ]
463
+ metadata : { requires : {
464
+ topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ]
465
465
, mongodb : ">= 2.8.0"
466
466
} } ,
467
-
467
+
468
468
// The actual test we wish to run
469
469
test : function ( configuration , test ) {
470
470
var Db = configuration . require . Db
@@ -485,7 +485,7 @@ exports['should correctly list collection names with batchSize 1 for 2.8 or high
485
485
// Create a collection
486
486
db1 . collection ( 'test.collection2' ) . insertOne ( { a :1 } , function ( ) {
487
487
test . equal ( null , err ) ;
488
-
488
+
489
489
// Get listCollections filtering out the name
490
490
var cursor = db1 . listCollections ( { name : / t e s t .c o l l e c t i o n / } , { batchSize :1 } ) ;
491
491
cursor . toArray ( function ( err , names ) {
@@ -505,11 +505,11 @@ exports['should correctly list collection names with batchSize 1 for 2.8 or high
505
505
* @ignore
506
506
*/
507
507
exports [ 'should correctly execute close function in order' ] = {
508
- metadata : { requires : {
509
- topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ]
508
+ metadata : { requires : {
509
+ topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ]
510
510
, mongodb : ">= 2.8.0"
511
511
} } ,
512
-
512
+
513
513
// The actual test we wish to run
514
514
test : function ( configuration , test ) {
515
515
var Db = configuration . require . Db
@@ -522,9 +522,9 @@ exports['should correctly execute close function in order'] = {
522
522
var items = [ ] ;
523
523
524
524
items . push ( 1 ) ;
525
- db . close ( function ( ) {
525
+ db . close ( function ( ) {
526
526
test . equal ( 2 , items . length ) ;
527
- test . done ( ) ;
527
+ test . done ( ) ;
528
528
} ) ;
529
529
items . push ( 2 ) ;
530
530
} ) ;
0 commit comments