@@ -865,9 +865,9 @@ def test_execute_batch_dml_abort_retry(self, dbapi_database):
865865 self ._cursor .execute ("run batch" )
866866 dbapi_database ._method_abort_interceptor .reset ()
867867 self ._conn .commit ()
868- assert method_count_interceptor ._counts [COMMIT_METHOD ] = = 1
869- assert method_count_interceptor ._counts [EXECUTE_BATCH_DML_METHOD ] = = 3
870- assert method_count_interceptor ._counts [EXECUTE_STREAMING_SQL_METHOD ] = = 6
868+ assert method_count_interceptor ._counts [COMMIT_METHOD ] > = 1
869+ assert method_count_interceptor ._counts [EXECUTE_BATCH_DML_METHOD ] > = 3
870+ assert method_count_interceptor ._counts [EXECUTE_STREAMING_SQL_METHOD ] > = 6
871871
872872 self ._cursor .execute ("SELECT * FROM contacts" )
873873 got_rows = self ._cursor .fetchall ()
@@ -879,28 +879,28 @@ def test_multiple_aborts_in_transaction(self, dbapi_database):
879879
880880 method_count_interceptor = dbapi_database ._method_count_interceptor
881881 method_count_interceptor .reset ()
882- # called 3 times
882+ # called at least 3 times
883883 self ._insert_row (1 )
884884 dbapi_database ._method_abort_interceptor .set_method_to_abort (
885885 EXECUTE_STREAMING_SQL_METHOD , self ._conn
886886 )
887- # called 3 times
887+ # called at least 3 times
888888 self ._cursor .execute ("SELECT * FROM contacts" )
889889 dbapi_database ._method_abort_interceptor .reset ()
890890 self ._cursor .fetchall ()
891- # called 2 times
891+ # called at least 2 times
892892 self ._insert_row (2 )
893- # called 2 times
893+ # called at least 2 times
894894 self ._cursor .execute ("SELECT * FROM contacts" )
895895 self ._cursor .fetchone ()
896896 dbapi_database ._method_abort_interceptor .set_method_to_abort (
897897 COMMIT_METHOD , self ._conn
898898 )
899- # called 2 times
899+ # called at least 2 times
900900 self ._conn .commit ()
901901 dbapi_database ._method_abort_interceptor .reset ()
902- assert method_count_interceptor ._counts [COMMIT_METHOD ] = = 2
903- assert method_count_interceptor ._counts [EXECUTE_STREAMING_SQL_METHOD ] = = 10
902+ assert method_count_interceptor ._counts [COMMIT_METHOD ] > = 2
903+ assert method_count_interceptor ._counts [EXECUTE_STREAMING_SQL_METHOD ] > = 10
904904
905905 self ._cursor .execute ("SELECT * FROM contacts" )
906906 got_rows = self ._cursor .fetchall ()
@@ -921,8 +921,8 @@ def test_consecutive_aborted_transactions(self, dbapi_database):
921921 )
922922 self ._conn .commit ()
923923 dbapi_database ._method_abort_interceptor .reset ()
924- assert method_count_interceptor ._counts [COMMIT_METHOD ] = = 2
925- assert method_count_interceptor ._counts [EXECUTE_STREAMING_SQL_METHOD ] = = 6
924+ assert method_count_interceptor ._counts [COMMIT_METHOD ] > = 2
925+ assert method_count_interceptor ._counts [EXECUTE_STREAMING_SQL_METHOD ] > = 6
926926
927927 method_count_interceptor = dbapi_database ._method_count_interceptor
928928 method_count_interceptor .reset ()
@@ -935,8 +935,8 @@ def test_consecutive_aborted_transactions(self, dbapi_database):
935935 )
936936 self ._conn .commit ()
937937 dbapi_database ._method_abort_interceptor .reset ()
938- assert method_count_interceptor ._counts [COMMIT_METHOD ] = = 2
939- assert method_count_interceptor ._counts [EXECUTE_STREAMING_SQL_METHOD ] = = 6
938+ assert method_count_interceptor ._counts [COMMIT_METHOD ] > = 2
939+ assert method_count_interceptor ._counts [EXECUTE_STREAMING_SQL_METHOD ] > = 6
940940
941941 self ._cursor .execute ("SELECT * FROM contacts" )
942942 got_rows = self ._cursor .fetchall ()
0 commit comments