@@ -204,6 +204,7 @@ def test_server_selector_bypassed(self):
204
204
# https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#8-server-selection
205
205
class TestServerSelectionCSOT (IntegrationTest ):
206
206
# https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#serverselectiontimeoutms-honored-if-timeoutms-is-not-set
207
+ @client_context .require_version_min (4 , 4 , - 1 )
207
208
def test_08_01_server_selection_timeoutMS_honored (self ):
208
209
client = self .single_client ("mongodb://invalid/?serverSelectionTimeoutMS=10" )
209
210
with self .assertRaises (ServerSelectionTimeoutError ):
@@ -215,6 +216,7 @@ def test_08_01_server_selection_timeoutMS_honored(self):
215
216
self .assertLessEqual (start - end , 15 )
216
217
217
218
# https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#timeoutms-honored-for-server-selection-if-its-lower-than-serverselectiontimeoutms
219
+ @client_context .require_version_min (4 , 4 , - 1 )
218
220
def test_08_02_timeoutMS_honored_for_server_selection_if_lower (self ):
219
221
client = self .single_client ("mongodb://invalid/?timeoutMS=10&serverSelectionTimeoutMS=20" )
220
222
with self .assertRaises (ServerSelectionTimeoutError ):
@@ -225,6 +227,7 @@ def test_08_02_timeoutMS_honored_for_server_selection_if_lower(self):
225
227
self .assertLessEqual (start - end , 15 )
226
228
227
229
# https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#serverselectiontimeoutms-honored-for-server-selection-if-its-lower-than-timeoutms
230
+ @client_context .require_version_min (4 , 4 , - 1 )
228
231
def test_08_03_serverselectiontimeoutms_honored_for_server_selection_if_lower (self ):
229
232
client = self .single_client ("mongodb://invalid/?timeoutMS=20&serverSelectionTimeoutMS=10" )
230
233
with self .assertRaises (ServerSelectionTimeoutError ):
@@ -236,6 +239,7 @@ def test_08_03_serverselectiontimeoutms_honored_for_server_selection_if_lower(se
236
239
self .assertLessEqual (start - end , 15 )
237
240
238
241
# https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#serverselectiontimeoutms-honored-for-server-selection-if-timeoutms0
242
+ @client_context .require_version_min (4 , 4 , - 1 )
239
243
def test_08_04_serverselectiontimeoutms_honored_for_server_selection_if_zero_timeoutms (self ):
240
244
client = self .single_client ("mongodb://invalid/?timeoutMS=0&serverSelectionTimeoutMS=10" )
241
245
with self .assertRaises (ServerSelectionTimeoutError ):
@@ -248,6 +252,8 @@ def test_08_04_serverselectiontimeoutms_honored_for_server_selection_if_zero_tim
248
252
249
253
# https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#timeoutms-honored-for-connection-handshake-commands-if-its-lower-than-serverselectiontimeoutms
250
254
@client_context .require_auth
255
+ @client_context .require_version_min (4 , 4 , - 1 )
256
+ @client_context .require_failCommand_fail_point
251
257
def test_08_05_timeoutms_honored_for_handshake_if_lower (self ):
252
258
with self .fail_point (
253
259
{
@@ -270,6 +276,8 @@ def test_08_05_timeoutms_honored_for_handshake_if_lower(self):
270
276
271
277
# https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#serverselectiontimeoutms-honored-for-connection-handshake-commands-if-its-lower-than-timeoutms
272
278
@client_context .require_auth
279
+ @client_context .require_version_min (4 , 4 , - 1 )
280
+ @client_context .require_failCommand_fail_point
273
281
def test_08_06_serverSelectionTimeoutMS_honored_for_handshake_if_lower (self ):
274
282
with self .fail_point (
275
283
{
0 commit comments