]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
heisenbug in aisle 3
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 9 Feb 2008 01:24:01 +0000 (01:24 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 9 Feb 2008 01:24:01 +0000 (01:24 +0000)
(when db.dispose is called in unitofwork test with sqlite, the first test that runs in memusage grows by two gc'ed objects on every iteration; then the problem vanishes.  doesnt matter what test runs in memusage.  doing a dispose() in memusage solves the problem also.  screwing wiht the mechanics of engine.dispose() only fix it when both the pool.dispose() *and* the pool.ressurect() are disabled.  its just a subtle python/pysqlite bug afaict)

test/orm/unitofwork.py

index ee696cd9d47959d5a792249ecc3d3d798e78b7f2..36222472d52f00c85a41c4e20757a2dcc9e85b01 100644 (file)
@@ -2024,6 +2024,7 @@ class TransactionTest(ORMTest):
         # todo: on 8.3 at least, the failed commit seems to close the cursor?
         # needs investigation.  leaving in the DDL above now to help verify
         # that the new deferrable support on FK isn't involved in this issue.
-        t1.bind.engine.dispose()
+        if testing.against('postgres'):
+            t1.bind.engine.dispose()
 if __name__ == "__main__":
     testenv.main()