Fix tests with ZODB 5.6
By definition IStorage level methods need to be passed in storage-level IStorageTransactionMetaData, not regular transaction.Transaction objects: https://github.com/zopefoundation/ZODB/blob/5.6.0-35-g1fb097b41/src/ZODB/interfaces.py#L827-L830 Passing in there regular transaction.Transaction used to work historically, but after https://github.com/zopefoundation/ZODB/commit/2f8cc67a it started to fail as: Error in test test_conflict_cache_clears_over_time (tempstorage.tests.testTemporaryStorage.TemporaryStorageTests) Traceback (most recent call last): File "/usr/lib/python2.7/unittest/case.py", line 329, in run testMethod() File "/home/kirr/src/wendelin/z/tempstorage/src/tempstorage/tests/testTemporaryStorage.py", line 195, in test_conflict_cache_clears_over_time self._dostore(storage, oid1, data=MinPO(5)) File "/home/kirr/src/wendelin/z/tempstorage/src/tempstorage/tests/testTemporaryStorage.py", line 132, in _dostore storage.tpc_begin(t) File "/home/kirr/src/wendelin/z/ZODB/src/ZODB/BaseStorage.py", line 193, in tpc_begin ext = transaction.extension_bytes AttributeError: 'Transaction' object has no attribute 'extension_bytes' -> Fix it by using storage-level transactions in tests.
Showing
Please register or sign in to comment