@@ -552,7 +552,10 @@ def setUpClass(cls):
552
552
if cls .TEST_SPEC ['description' ].find ('change-streams' ) != - 1 :
553
553
raise unittest .SkipTest (
554
554
"MMAPv1 does not support change streams" )
555
-
555
+ if cls .TEST_SPEC ['description' ].find (
556
+ 'transactions-convenient-api' ) != - 1 :
557
+ raise unittest .SkipTest (
558
+ "MMAPv1 does not support document-level locking" )
556
559
557
560
@classmethod
558
561
def tearDownClass (cls ):
@@ -574,6 +577,14 @@ def setUp(self):
574
577
# initialize internals
575
578
self .match_evaluator = MatchEvaluatorUtil (self )
576
579
580
+ def maybe_skip_test (self , spec ):
581
+ # add any special-casing for skipping tests here
582
+ if client_context .storage_engine == 'mmapv1' :
583
+ if spec ['description' ].find (
584
+ 'Dirty explicit session is discarded' ) != - 1 :
585
+ raise unittest .SkipTest (
586
+ "MMAPv1 does not support retryWrites=True" )
587
+
577
588
def process_error (self , exception , spec ):
578
589
is_error = spec .get ('isError' )
579
590
is_client_error = spec .get ('isClientError' )
@@ -898,6 +909,9 @@ def verify_outcome(self, spec):
898
909
actual_documents )
899
910
900
911
def run_scenario (self , spec ):
912
+ # maybe skip test manually
913
+ self .maybe_skip_test (spec )
914
+
901
915
# process test-level runOnRequirements
902
916
run_on_spec = spec .get ('runOnRequirements' , [])
903
917
if not self .should_run_on (run_on_spec ):
0 commit comments