Tony Locke <[email protected]> wrote:
> Hi, I've encountered a glitch when running py.test over the entire test suite > with the postgresql+pg8000 dialect: > > py.test --dburi postgresql+pg8000://postgres:xxx@localhost:5436/test > > the test hangs at: > > test/dialect/test_oracle.py::CompatFlagsTest::test_ora8_flags PASSED > > then if I do a Ctrl-C it carries on and reports all tests as having passed. > The versions are: > > platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 > pg8000 1.10.2 (works fine with the previous version 1.10.1) > the sqlalchemy version is the latest commit on the master branch (commit > cd076470baf2fce0eebf5853e3145d96a9d48378) > > One really odd thing is that if I run py.test with the -s option (don't > capture output) then it runs fine. Also, if I run just > test/dialect/test_oracle.py then it runs okay, it's only a problem when > running all tests. Any ideas gratefully received! usually what happens here is a test doesn’t clean up a result set after itself, the test ends and that connection stays floating, e.g. not checked in. then the teardown of the test suite can’t drop the tables. I usually view this just doing a “ps -ef | grep post” and the fix is to figure out which test isn’t cleaning up after itself, and then adjusting. this can be tricky, like, it might not be that particular test you see, it could be some other test. But figuring out where its locking, which 99% of the time is on a DROP, is a good first step. As to why this might have changed, if pg8000 made any changes that make it less likely that a dereferenced cursor or connection would be garbage collected, like a reference cycle, that could trigger this kind of thing. > Thanks, > > Tony. > > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
