[Twisted-Python] trial and adbapi.ConnectionPool

Jack Moffitt jack at chesspark.com
Fri Jul 25 20:30:00 EDT 2008

On Fri, Jul 25, 2008 at 6:20 AM, Jean-Paul Calderone <exarkun at divmod.com> wrote:
> On Fri, 25 Jul 2008 14:50:12 +1000, Tim Allen <tim at commsecure.com.au> wrote:
>> In the projects I'm working on at the moment, we're using
>> t.e.adbapi.ConnectionPool wrapping psycopg2 to handle connections to a
>> PostgreSQL database. The setUp method of our unit-tests drops and
>> recreates the database each time, and we've discovered that
>> intermittently tests will fail because a previous test is still
>> connected to the database when the subsequent test runs. Annoyingly, it
>> happens on some machines and not others.
> The problem may have something to do with the implementation of
> adbapi.Connection.close:

Even with a better close() we get similar issues at Chesspark.  I'm
very happy to learn about the gc.collect() workaround.


More information about the Twisted-Python mailing list