I have a function that updates a large table. My tests for this
function worked fine against the development database. It sometimes
fails on the production database however. The problem is that the
function locks the entire table while doing the update, so when
another user starts that function, it has to wait for the first user's
request to finish before it can start, and I get an InnoDB "Lock wait
timeout exceeded" error.
I want to write a test to reproduce the error so I can recode it. How
can I write a controller test function that will send 2 requests
asynchronously? Should I be looking at the threading module, or does
paste/pylons/nosetests/unittests provide a solution?
Something like:
self.app.get('first request')
# Wait 10 seconds.
self.app.get('second request')
# Assert that both completed.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.