The `for attempt` loop does not terminate properly

Bug #724332 reported by Zvezdan Petkovic on 2011-02-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
transaction
Undecided
Unassigned

Bug Description

When a convenience `for attempt` loop is used with transaction manager, the loop does not terminate properly after the successful transaction. The tests are checking only for ``ntry % 3``. Since the default number of retries are 3 it seems that the tests work correctly for successful transaction. However, when the condition is changed it shows that the loop continues to the end (e.g., five iterations), despite the successful transaction which should have stopped the iteration.

The attached patch adds the tests that:

- confirm the problem
- show the workaround
- suggest the possible fix in the code

The patch does not attempt to fix the code of the `attempts` method because there is, perhaps, a better way to deal with this issue.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers