File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -217,15 +217,12 @@ def abort_transaction(self):
217217
218218 def _finish_transaction (self , command_name ):
219219 if self ._current_transaction_opts is None :
220- raise InvalidOperation ("No transaction in progress " )
220+ raise InvalidOperation ("No transaction started " )
221221
222222 if self ._server_session .statement_id == 0 :
223223 # Not really started.
224224 return
225225
226- if command_name == 'abortTransaction' :
227- assert False , "Not implemented" # Await server.
228-
229226 try :
230227 # TODO: retryable. And it's weird to pass parse_write_concern_error
231228 # from outside database.py.
Original file line number Diff line number Diff line change @@ -234,13 +234,7 @@ def expect_error(expected_result):
234234
235235def end_sessions (sessions ):
236236 for s in sessions .values ():
237- try :
238- s .commit_transaction ()
239- except Exception :
240- # Ignore errors from committing without an open transaction.
241- pass
242-
243- for s in sessions .values ():
237+ # Aborts the transaction if it's open.
244238 s .end_session ()
245239
246240
You can’t perform that action at this time.
0 commit comments