Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#7981 closed (fixed)

serializers_regress test doesn't properly leave transaction management

Reported by: leosoto Owned by: nobody
Component: Testing framework Version: master
Severity: Keywords: jython
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:

Description

On source:/django/trunk/tests/regressiontests/serializers_regress/tests.py, if an exception occurs while transaction management is active, the transaction management block isn't properly "closed". This causes test suite crashes because the database can't be flushed later without committing or rollbacking the transaction (I'm experimenting them on my Jython testing).

The attaches patch ensures that leave_transaction_managed is always executed.

Attachments (1)

7981_serializers_regress_tests_fix_transaction_management.diff (3.2 KB) - added by leosoto 6 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 6 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(In [8099]) Fixed #7981 -- Wrap the manual transaction management in the
serializers_regress tests in some "try...finally" blocks. Patch from Leo Soto.

comment:2 Changed 3 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.