@@ -118,7 +118,7 @@ describe('Connections survive primary step down', function() {
118
118
} ) ;
119
119
120
120
it ( 'Not Master - Reset Connection Pool' , {
121
- metadata : { requires : { mongodb : '<= 4.0.0 ' , topology : 'replicaset' } } ,
121
+ metadata : { requires : { mongodb : '4.0.x ' , topology : 'replicaset' } } ,
122
122
test : function ( ) {
123
123
const db = client . db ( 'step-down' ) ;
124
124
let numberOfConnections ;
@@ -141,29 +141,27 @@ describe('Connections survive primary step down', function() {
141
141
mode : { times : 1 } ,
142
142
data : { failCommands : [ 'insert' ] , errorCode : 10107 }
143
143
} )
144
- . then ( ( ) => {
145
- collection
146
- . insertOne ( { test : 1 } )
147
- . catch ( err => expect ( err . code ) . to . equal ( 10107 ) )
148
- . then ( ( ) =>
149
- db . executeDbAdminCommand ( { configureFailPoint : 'failCommand' , mode : 'off' } )
144
+ . then ( ( ) =>
145
+ collection . insertOne ( { test : 1 } ) . catch ( err => expect ( err . code ) . to . equal ( 10107 ) )
146
+ )
147
+ . then ( ( ) =>
148
+ db . executeDbAdminCommand ( { configureFailPoint : 'failCommand' , mode : 'off' } )
149
+ )
150
+ . then ( ( ) =>
151
+ db
152
+ . admin ( )
153
+ . serverStatus ( )
154
+ . then ( result =>
155
+ expect ( result . connections . totalCreated ) . to . equal ( numberOfConnections + 1 )
150
156
)
151
- . then ( ( ) =>
152
- db
153
- . admin ( )
154
- . serverStatus ( )
155
- . then ( result =>
156
- expect ( result . connections . totalCreated ) . to . equal ( numberOfConnections + 1 )
157
- )
158
- ) ;
159
- } )
157
+ )
160
158
)
161
159
) ;
162
160
}
163
161
} ) ;
164
162
165
163
it ( 'Shutdown in progress - Reset Connection Pool' , {
166
- metadata : { requires : { topology : 'replicaset' } } ,
164
+ metadata : { requires : { mongodb : '>=4.0.0' , topology : 'replicaset' } } ,
167
165
test : function ( ) {
168
166
const db = client . db ( 'step-down' ) ;
169
167
let numberOfConnections ;
@@ -206,7 +204,7 @@ describe('Connections survive primary step down', function() {
206
204
} ) ;
207
205
208
206
it ( 'Interrupted at shutdown - Reset Connection Pool' , {
209
- metadata : { requires : { topology : 'replicaset' } } ,
207
+ metadata : { requires : { mongodb : '>=4.0.0' , topology : 'replicaset' } } ,
210
208
test : function ( ) {
211
209
const db = client . db ( 'step-down' ) ;
212
210
let numberOfConnections ;
0 commit comments