@@ -7,7 +7,7 @@ exports.shouldCorrectlyEmitErrorOnAllDbsOnPoolClose = {
7
7
// Add a tag that our runner can trigger on
8
8
// in this case we are setting that node needs to be higher than 0.10.X to run
9
9
metadata : { requires : { topology : 'single' } } ,
10
-
10
+
11
11
// The actual test we wish to run
12
12
test : function ( configuration , test ) {
13
13
if ( process . platform !== 'linux' ) {
@@ -22,7 +22,7 @@ exports.shouldCorrectlyEmitErrorOnAllDbsOnPoolClose = {
22
22
db . on ( "close" , function ( err ) {
23
23
numberOfCloses = numberOfCloses + 1 ;
24
24
} )
25
-
25
+
26
26
db . open ( function ( err , db ) {
27
27
db . createCollection ( 'shouldCorrectlyErrorOnAllDbs' , function ( err , collection ) {
28
28
test . equal ( null , err ) ;
@@ -49,7 +49,7 @@ exports.shouldCorrectlyEmitErrorOnAllDbsOnPoolClose = {
49
49
db . close ( ) ;
50
50
} ) ;
51
51
} ) ;
52
- } ) ;
52
+ } ) ;
53
53
} else {
54
54
test . done ( ) ;
55
55
}
@@ -58,12 +58,12 @@ exports.shouldCorrectlyEmitErrorOnAllDbsOnPoolClose = {
58
58
59
59
/**
60
60
* Test the auto connect functionality of the db
61
- *
61
+ *
62
62
* @ignore
63
63
*/
64
64
exports . shouldCorrectlyUseSameConnectionsForTwoDifferentDbs = {
65
65
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
66
-
66
+
67
67
// The actual test we wish to run
68
68
test : function ( configuration , test ) {
69
69
var client = configuration . newDbInstance ( { w :1 } , { poolSize :1 } ) ;
@@ -77,7 +77,7 @@ exports.shouldCorrectlyUseSameConnectionsForTwoDifferentDbs = {
77
77
var secondDb = client . db ( configuration . db_name + "_2" ) ;
78
78
secondDb . createCollection ( 'shouldCorrectlyUseSameConnectionsForTwoDifferentDbs' , function ( err , collection ) {
79
79
// Insert a dummy document
80
- collection . insert ( { a :20 } , { safe : true } , function ( err , r ) {
80
+ collection . insert ( { a :20 } , { safe : true } , function ( err , r ) {
81
81
test . equal ( null , err ) ;
82
82
83
83
// Query it
@@ -87,21 +87,21 @@ exports.shouldCorrectlyUseSameConnectionsForTwoDifferentDbs = {
87
87
// Use the other db
88
88
client . createCollection ( 'shouldCorrectlyUseSameConnectionsForTwoDifferentDbs' , function ( err , collection ) {
89
89
// Insert a dummy document
90
- collection . insert ( { b :20 } , { safe : true } , function ( err , r ) {
91
- test . equal ( null , err ) ;
90
+ collection . insert ( { b :20 } , { safe : true } , function ( err , r ) {
91
+ test . equal ( null , err ) ;
92
92
93
93
// Query it
94
94
collection . findOne ( { } , function ( err , item ) {
95
95
test . equal ( 20 , item . b ) ;
96
96
97
97
test . equal ( null , err ) ;
98
98
client . close ( ) ;
99
- second_test_database . close ( ) ;
100
- test . done ( ) ;
101
- } ) ;
99
+ second_test_database . close ( ) ;
100
+ test . done ( ) ;
101
+ } ) ;
102
102
} ) ;
103
103
} ) ;
104
- } ) ;
104
+ } ) ;
105
105
} ) ;
106
106
} ) ;
107
107
} ) ;
@@ -114,7 +114,7 @@ exports.shouldCorrectlyUseSameConnectionsForTwoDifferentDbs = {
114
114
*/
115
115
exports . shouldCorrectlyHandleMultipleDbsFindAndModifies = {
116
116
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
117
-
117
+
118
118
// The actual test we wish to run
119
119
test : function ( configuration , test ) {
120
120
var db = configuration . newDbInstance ( { w :1 } , { poolSize :1 } ) ;
@@ -138,10 +138,10 @@ exports.shouldCorrectlyHandleMultipleDbsFindAndModifies = {
138
138
*/
139
139
exports [ 'should not leak listeners' ] = {
140
140
metadata : { requires : { topology : [ 'single' , 'replicaset' , 'sharded' , 'ssl' , 'heap' , 'wiredtiger' ] } } ,
141
-
141
+
142
142
// The actual test we wish to run
143
143
test : function ( configuration , test ) {
144
- var MongoClient = configuration . require . MongoClient ;
144
+ var MongoClient = configuration . require . MongoClient ;
145
145
MongoClient . connect ( configuration . url ( ) , function ( err , db ) {
146
146
for ( var i = 0 ; i < 100 ; i ++ ) {
147
147
db . db ( "test" ) ;
@@ -151,4 +151,4 @@ exports['should not leak listeners'] = {
151
151
test . done ( ) ;
152
152
} ) ;
153
153
}
154
- }
154
+ }
0 commit comments