Skip to content

Commit

Permalink
Clear transaction syncs earlier
Browse files Browse the repository at this point in the history
To mitigate errors during tearDown.

Lots of tests are sloppy about closing connection (because they could
be), but storages tend to get closed and transactions aborted. This
has the effedt of calling afterCompletion on connections which tries
to call storage lastTransaction, which causes errors.
  • Loading branch information
Jim Fulton committed Jun 7, 2016
1 parent 6c0b560 commit 7a75ba7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ZODB/tests/util.py
Expand Up @@ -73,8 +73,8 @@ def setUp(test, name='test'):
zope.testing.setupstack.register(test, transaction.abort)

def tearDown(test):
zope.testing.setupstack.tearDown(test)
clear_transaction_syncs()
zope.testing.setupstack.tearDown(test)

class TestCase(unittest.TestCase):

Expand Down

0 comments on commit 7a75ba7

Please sign in to comment.