summaryrefslogtreecommitdiff
path: root/tests/test_async.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Merged tests from piro and jan async fixes branchesFederico Di Gregorio2010-04-141-3/+2
|
* Make the first poll() of an asynchronous connection return POLL_WRITE.Jan Urbański2010-04-141-36/+33
| | | | | | | | | | This hides from the user the libpq's implementation detail of requiring the first select() to wait for the connection socket to become writable and makes it possible to have a uniform select loop for both cursors and connections, in which you always start by polling the object and then acting according to the result from poll(). Idea and implementation by Daniele Varrazzo.
* Make polling a cursor that's not in an async query raise an exception.Jan Urbański2010-04-141-1/+28
| | | | | | | If there is an asynchronous query, polling a cursor that did not initiate it will raise an exception. Polling while there is no asynchronous query underway still works, because the user needs to have a way to get asynchronous NOTIFYs.
* Added a test to check poll() correctly calls PQflush.Daniele Varrazzo2010-04-111-0/+30
| | | | | | | When a large query is sent to the backend (and probably in high concurrency situations), writing the query could block. In this case PQflush() should be called until it returns 0. The test checks this is done correctly.
* test_async made properly executable.Daniele Varrazzo2010-04-111-0/+4
|
* Added test to check that connections subclasses can be asynchronous.Daniele Varrazzo2010-04-081-0/+11
|
* Adapt the tests to recent changesJan Urbański2010-04-051-54/+80
| | | | | | Some methods were forbidden in asynchronous mode, the isolation level of an asynchronous connection is not always 0 and these changes influenced expected test results.
* Add tests for the asynchronous APIJan Urbański2010-04-051-0/+252