@@ -534,17 +534,25 @@ def maybe_skip_test(self, spec):
534534 description = spec ["description" ].lower ()
535535 if "csot" in class_name :
536536 # Skip tests that are too slow to run on a given platform.
537- slow_win32 = [
538- "maxtimems value in the command is less than timeoutms" ,
539- "non-tailable cursor lifetime remaining timeoutms applied to getmore if timeoutmode is unset" ,
540- ]
541537 slow_macos = [
542- "non-tailable cursor lifetime remaining timeoutms applied to getmore if timeoutmode is unset"
538+ "operation fails after two consecutive socket timeouts.*" ,
539+ "operation succeeds after one socket timeout.*" ,
540+ "Non-tailable cursor lifetime remaining timeoutMS applied to getMore if timeoutMode is unset" ,
541+ ]
542+ slow_win32 = [
543+ * slow_macos ,
544+ "maxTimeMS value in the command is less than timeoutMS" ,
543545 ]
544- if sys .platform == "win32" and description in slow_win32 or "gridfs" in class_name :
545- self .skipTest ("PYTHON-3522 CSOT test runs too slow on Windows" )
546- if sys .platform == "darwin" and description in slow_macos :
547- self .skipTest ("PYTHON-3522 CSOT test runs too slow on MacOS" )
546+ if sys .platform == "win32" and "gridfs" in class_name :
547+ self .skipTest ("PYTHON-3522 CSOT GridFS test runs too slow on Windows" )
548+ if sys .platform == "win32" :
549+ for pat in slow_win32 :
550+ if re .match (pat , description .lower ()):
551+ self .skipTest ("PYTHON-3522 CSOT test runs too slow on Windows" )
552+ if sys .platform == "darwin" :
553+ for pat in slow_macos :
554+ if re .match (pat , description .lower ()):
555+ self .skipTest ("PYTHON-3522 CSOT test runs too slow on MacOS" )
548556 if async_client_context .storage_engine == "mmapv1" :
549557 self .skipTest (
550558 "MMAPv1 does not support retryable writes which is required for CSOT tests"
0 commit comments