Commit ffe34600 authored by Julien Muchembled's avatar Julien Muchembled

fixup! client: drop support for ZODB < 3.10

See commit d9ab77b8
parent 9a6ad2e6
...@@ -797,8 +797,6 @@ class Application(object): ...@@ -797,8 +797,6 @@ class Application(object):
data = tryToResolveConflict(oid, current_serial, data = tryToResolveConflict(oid, current_serial,
undone_tid, undo_data, data) undone_tid, undo_data, data)
except ConflictError: except ConflictError:
data = None
if data is None:
raise UndoError('Some data were modified by a later ' \ raise UndoError('Some data were modified by a later ' \
'transaction', oid) 'transaction', oid)
undo_serial = None undo_serial = None
......
...@@ -502,12 +502,10 @@ class ClientApplicationTests(NeoUnitTestBase): ...@@ -502,12 +502,10 @@ class ClientApplicationTests(NeoUnitTestBase):
app = self.getApp() app = self.getApp()
tid = self.makeTID() tid = self.makeTID()
txn = self.makeTransactionObject() txn = self.makeTransactionObject()
def tryToResolveConflict(oid, conflict_serial, serial, data):
pass
app.master_conn = Mock() app.master_conn = Mock()
conn = Mock() conn = Mock()
self.assertRaises(StorageTransactionError, app.undo, tid, self.assertRaises(StorageTransactionError, app.undo, tid,
txn, tryToResolveConflict) txn, failing_tryToResolveConflict)
# no packet sent # no packet sent
self.checkNoPacketSent(conn) self.checkNoPacketSent(conn)
self.checkNoPacketSent(app.master_conn) self.checkNoPacketSent(app.master_conn)
...@@ -612,7 +610,7 @@ class ClientApplicationTests(NeoUnitTestBase): ...@@ -612,7 +610,7 @@ class ClientApplicationTests(NeoUnitTestBase):
def tryToResolveConflict(oid, conflict_serial, serial, data, def tryToResolveConflict(oid, conflict_serial, serial, data,
committedData=''): committedData=''):
marker.append((oid, conflict_serial, serial, data, committedData)) marker.append((oid, conflict_serial, serial, data, committedData))
return None raise ConflictError
# The undo # The undo
txn = self.beginTransaction(app, tid=tid3) txn = self.beginTransaction(app, tid=tid3)
self.assertRaises(UndoError, app.undo, tid1, txn, tryToResolveConflict) self.assertRaises(UndoError, app.undo, tid1, txn, tryToResolveConflict)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment