@@ -204,6 +204,7 @@ def test_server_selector_bypassed(self):
204204# https://github.com/mongodb/specifications/blob/master/source/client-side-operations-timeout/tests/README.md#8-server-selection
205205class TestServerSelectionCSOT (IntegrationTest ):
206206 # 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 )
207208 def test_08_01_server_selection_timeoutMS_honored (self ):
208209 client = self .single_client ("mongodb://invalid/?serverSelectionTimeoutMS=10" )
209210 with self .assertRaises (ServerSelectionTimeoutError ):
@@ -215,6 +216,7 @@ def test_08_01_server_selection_timeoutMS_honored(self):
215216 self .assertLessEqual (start - end , 15 )
216217
217218 # 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 )
218220 def test_08_02_timeoutMS_honored_for_server_selection_if_lower (self ):
219221 client = self .single_client ("mongodb://invalid/?timeoutMS=10&serverSelectionTimeoutMS=20" )
220222 with self .assertRaises (ServerSelectionTimeoutError ):
@@ -225,6 +227,7 @@ def test_08_02_timeoutMS_honored_for_server_selection_if_lower(self):
225227 self .assertLessEqual (start - end , 15 )
226228
227229 # 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 )
228231 def test_08_03_serverselectiontimeoutms_honored_for_server_selection_if_lower (self ):
229232 client = self .single_client ("mongodb://invalid/?timeoutMS=20&serverSelectionTimeoutMS=10" )
230233 with self .assertRaises (ServerSelectionTimeoutError ):
@@ -236,6 +239,7 @@ def test_08_03_serverselectiontimeoutms_honored_for_server_selection_if_lower(se
236239 self .assertLessEqual (start - end , 15 )
237240
238241 # 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 )
239243 def test_08_04_serverselectiontimeoutms_honored_for_server_selection_if_zero_timeoutms (self ):
240244 client = self .single_client ("mongodb://invalid/?timeoutMS=0&serverSelectionTimeoutMS=10" )
241245 with self .assertRaises (ServerSelectionTimeoutError ):
@@ -248,6 +252,8 @@ def test_08_04_serverselectiontimeoutms_honored_for_server_selection_if_zero_tim
248252
249253 # 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
250254 @client_context .require_auth
255+ @client_context .require_version_min (4 , 4 , - 1 )
256+ @client_context .require_failCommand_fail_point
251257 def test_08_05_timeoutms_honored_for_handshake_if_lower (self ):
252258 with self .fail_point (
253259 {
@@ -270,6 +276,8 @@ def test_08_05_timeoutms_honored_for_handshake_if_lower(self):
270276
271277 # 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
272278 @client_context .require_auth
279+ @client_context .require_version_min (4 , 4 , - 1 )
280+ @client_context .require_failCommand_fail_point
273281 def test_08_06_serverSelectionTimeoutMS_honored_for_handshake_if_lower (self ):
274282 with self .fail_point (
275283 {
0 commit comments