← Back to team overview

launchpad-dev team mailing list archive

Re: Double form submission problem


On Tue, Jun 22, 2010 at 2:34 PM, Stuart Bishop
<stuart.bishop@xxxxxxxxxxxxx> wrote:

>> Gary - thats the same way I'd test something like this - step through
>> the concurrency issue by hand; doing it at the browser level is really
>> hard :) - and worth noting I think that as we have many app servers,
>> and front ends, doing it in the real world is even harder.
> Generally you don't. We already have tests that integrity errors cause
> the transaction to retry. We should already have a test showing the
> form generates a nice error message to the user if a duplicate exists
> at the start of the transaction. Together these assert things work
> correctly.
> Assuming the form is correct, the issue here is a form asserting some
> constraint that is not backed by the database constraints. The
> appservers cannot resolve this.

I should have been more precise - if I were to test, I would simulate
concurrency rather than have real concurrency; designing the bug out
of the system is better of course, and thats why I asked about
constraints first ;)