Skip to content

Commit

Permalink
Merge pull request #289 from zopefoundation/transaction30
Browse files Browse the repository at this point in the history
Fix tests with transaction 3.0.
  • Loading branch information
jamadden committed Dec 12, 2019
2 parents 0b3db5a + 0adcc68 commit 8e97bd7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 245 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -31,6 +31,8 @@
storage. Previously, this produced confusing DEBUG logging. See
`issue 282 <https://github.com/zopefoundation/ZODB/issues/282>`_.

- Fix tests with transaction 3.0.

5.5.1 (2018-10-25)
==================

Expand Down
7 changes: 4 additions & 3 deletions src/ZODB/tests/testZODB.py
Expand Up @@ -290,8 +290,9 @@ def checkFailingCommitSticks(self):
rt['a'] = 1

# Arrange for commit to fail during tpc_vote.
poisoned = PoisonedObject(PoisonedJar(break_tpc_vote=True))
transaction.get().register(poisoned)
poisoned_jar = PoisonedJar(break_tpc_vote=True)
poisoned = PoisonedObject(poisoned_jar)
transaction.get().join(poisoned_jar)

self.assertRaises(PoisonedError, transaction.get().commit)
# Trying to commit again fails too.
Expand All @@ -314,7 +315,7 @@ def checkFailingCommitSticks(self):

# Cleaning up via begin() should also work.
rt['a'] = 2
transaction.get().register(poisoned)
transaction.get().join(poisoned_jar)
self.assertRaises(PoisonedError, transaction.commit)
self.assertRaises(TransactionFailedError, transaction.commit)
# The change to rt['a'] is lost.
Expand Down
242 changes: 0 additions & 242 deletions src/ZODB/tests/test_datamanageradapter.py

This file was deleted.

0 comments on commit 8e97bd7

Please sign in to comment.