@@ -144,7 +144,7 @@ class DefaultServerSpecification extends Specification {
144
144
then :
145
145
thrown(MongoSecurityException )
146
146
1 * connectionPool. invalidate()
147
- 1 * serverMonitor. invalidate ()
147
+ 1 * serverMonitor. connect ()
148
148
}
149
149
150
150
def ' failed open should invalidate the server asychronously' () {
@@ -170,7 +170,7 @@ class DefaultServerSpecification extends Specification {
170
170
then :
171
171
! receivedConnection
172
172
receivedThrowable. is(exceptionToThrow)
173
- 1 * serverMonitor. invalidate ()
173
+ 1 * serverMonitor. connect ()
174
174
}
175
175
176
176
def ' should invalidate on MongoNotPrimaryException' () {
@@ -196,7 +196,7 @@ class DefaultServerSpecification extends Specification {
196
196
then :
197
197
thrown(MongoNotPrimaryException )
198
198
1 * connectionPool. invalidate()
199
- 1 * serverMonitor. invalidate ()
199
+ 1 * serverMonitor. connect ()
200
200
201
201
when :
202
202
def futureResultCallback = new FutureResultCallback ()
@@ -207,7 +207,7 @@ class DefaultServerSpecification extends Specification {
207
207
then :
208
208
thrown(MongoNotPrimaryException )
209
209
1 * connectionPool. invalidate()
210
- 1 * serverMonitor. invalidate ()
210
+ 1 * serverMonitor. connect ()
211
211
212
212
when :
213
213
futureResultCallback = new FutureResultCallback ()
@@ -218,7 +218,7 @@ class DefaultServerSpecification extends Specification {
218
218
then :
219
219
thrown(MongoNotPrimaryException )
220
220
1 * connectionPool. invalidate()
221
- 1 * serverMonitor. invalidate ()
221
+ 1 * serverMonitor. connect ()
222
222
}
223
223
224
224
def ' should invalidate on MongoNodeIsRecoveringException' () {
@@ -244,7 +244,7 @@ class DefaultServerSpecification extends Specification {
244
244
then :
245
245
thrown(MongoNodeIsRecoveringException )
246
246
1 * connectionPool. invalidate()
247
- 1 * serverMonitor. invalidate ()
247
+ 1 * serverMonitor. connect ()
248
248
}
249
249
250
250
@@ -271,7 +271,7 @@ class DefaultServerSpecification extends Specification {
271
271
then :
272
272
thrown(MongoSocketException )
273
273
1 * connectionPool. invalidate()
274
- 1 * serverMonitor. invalidate ()
274
+ 1 * serverMonitor. connect ()
275
275
276
276
when :
277
277
def futureResultCallback = new FutureResultCallback<WriteConcernResult > ()
@@ -282,7 +282,7 @@ class DefaultServerSpecification extends Specification {
282
282
then :
283
283
thrown(MongoSocketException )
284
284
1 * connectionPool. invalidate()
285
- 1 * serverMonitor. invalidate ()
285
+ 1 * serverMonitor. connect ()
286
286
}
287
287
288
288
def ' should not invalidate on MongoSocketReadTimeoutException' () {
@@ -309,7 +309,7 @@ class DefaultServerSpecification extends Specification {
309
309
then :
310
310
thrown(MongoSocketReadTimeoutException )
311
311
0 * connectionPool. invalidate()
312
- 0 * serverMonitor. invalidate ()
312
+ 0 * serverMonitor. connect ()
313
313
314
314
when :
315
315
def futureResultCallback = new FutureResultCallback<WriteConcernResult > ()
@@ -320,7 +320,7 @@ class DefaultServerSpecification extends Specification {
320
320
then :
321
321
thrown(MongoSocketReadTimeoutException )
322
322
0 * connectionPool. invalidate()
323
- 0 * serverMonitor. invalidate ()
323
+ 0 * serverMonitor. connect ()
324
324
}
325
325
326
326
def ' should enable command listener' () {
0 commit comments