Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xavier Thompson
neoppod
Commits
e57ef6cc
Commit
e57ef6cc
authored
8 years ago
by
Julien Muchembled
Browse files
Options
Download
Email Patches
Plain Diff
Refresh patch to ZODB test suite, for new 4.3.1 release
parent
25a2f1cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
ZODB.patch
ZODB.patch
+13
-16
No files found.
ZODB.patch
View file @
e57ef6cc
Patch to ZODB 4.
2.0
for ZODB unit tests.
Patch to ZODB 4.
3.1
for ZODB unit tests.
See also monkey-patch to Connection.tpc_finish in neo/client/__init__.py
diff --git a/src/ZODB/interfaces.py b/src/ZODB/interfaces.py
...
...
@@ -113,7 +113,7 @@ index f0a2b72..5305807 100644
oids.extend(oid for (oid, _) in vote_result or ())
self.assertEqual(len(oids), len(expected_oids), repr(oids))
diff --git a/src/ZODB/tests/TransactionalUndoStorage.py b/src/ZODB/tests/TransactionalUndoStorage.py
index
a9490e1..b3f2ded
100644
index
0ee68b2..1c88720
100644
--- a/src/ZODB/tests/TransactionalUndoStorage.py
+++ b/src/ZODB/tests/TransactionalUndoStorage.py
@@ -73,6 +73,12 @@
def _transaction_vote(self, trans):
...
...
@@ -138,7 +138,7 @@ index a9490e1..b3f2ded 100644
for oid in newrevs.keys():
newrevs[oid] = self._transaction_newserial(oid)
return newrevs
@@ -21
5
,9 +22
1
,9 @@
def checkTwoObjectUndo(self):
@@ -21
9
,9 +22
5
,9 @@
def checkTwoObjectUndo(self):
self._transaction_store(oid2, revid2, p51, '', t)
# Finish the transaction
self._transaction_vote(t)
...
...
@@ -149,7 +149,7 @@ index a9490e1..b3f2ded 100644
eq(revid1, revid2)
# Update those same two objects
t = Transaction()
@@ -2
27
,9 +23
3
,9 @@
def checkTwoObjectUndo(self):
@@ -2
31
,9 +23
7
,9 @@
def checkTwoObjectUndo(self):
self._transaction_store(oid2, revid2, p52, '', t)
# Finish the transaction
self._transaction_vote(t)
...
...
@@ -160,24 +160,21 @@ index a9490e1..b3f2ded 100644
eq(revid1, revid2)
# Make sure the objects have the current value
data, revid1 = self._storage.load(oid1, '')
@@ -28
5
,1
1
+29
1
,1
2
@@
def checkTwoObjectUndoAtOnce(self):
@@ -28
9
,1
0
+29
5
,1
1
@@
def checkTwoObjectUndoAtOnce(self):
tid1 = info[1]['id']
t = Transaction()
oids = self._begin_undos_vote(t, tid, tid1)
- self._storage.tpc_finish(t)
+ serial = self._storage.tpc_finish(t)
# We get the finalization stuff called an extra time:
- eq(len(oids), 4)
- unless(oid1 in oids)
- unless(oid2 in oids)
# We may get the finalization stuff called an extra time,
# depending on the implementation.
- self.assertEqual(set(oids), set((oid1, oid2)))
+ if serial is None:
+ eq(len(oids), 4)
+ unless(oid1 in oids)
+ unless(oid2 in oids)
+ self.assertEqual(set(oids), {oid1, oid2})
data, revid1 = self._storage.load(oid1, '')
eq(zodb_unpickle(data), MinPO(30))
data, revid2 = self._storage.load(oid2, '')
@@ -32
3
,7 +33
0
,7 @@
def checkTwoObjectUndoAgain(self):
@@ -32
6
,7 +33
3
,7 @@
def checkTwoObjectUndoAgain(self):
self._transaction_store(oid2, revid2, p52, '', t)
# Finish the transaction
self._transaction_vote(t)
...
...
@@ -186,7 +183,7 @@ index a9490e1..b3f2ded 100644
revid1 = self._transaction_newserial(oid1)
revid2 = self._transaction_newserial(oid2)
eq(revid1, revid2)
@@ -34
3
,7 +35
0
,7 @@
def checkTwoObjectUndoAgain(self):
@@ -34
6
,7 +35
3
,7 @@
def checkTwoObjectUndoAgain(self):
self._transaction_store(oid2, revid2, p53, '', t)
# Finish the transaction
self._transaction_vote(t)
...
...
@@ -195,7 +192,7 @@ index a9490e1..b3f2ded 100644
revid1 = self._transaction_newserial(oid1)
revid2 = self._transaction_newserial(oid2)
eq(revid1, revid2)
@@ -35
5
,10 +36
2
,11 @@
def checkTwoObjectUndoAgain(self):
@@ -35
8
,10 +36
5
,11 @@
def checkTwoObjectUndoAgain(self):
tid = info[1]['id']
t = Transaction()
oids = self._begin_undos_vote(t, tid)
...
...
@@ -211,7 +208,7 @@ index a9490e1..b3f2ded 100644
data, revid1 = self._storage.load(oid1, '')
eq(zodb_unpickle(data), MinPO(33))
data, revid2 = self._storage.load(oid2, '')
@@ -39
5
,7 +40
3
,7 @@
def checkNotUndoable(self):
@@ -39
8
,7 +40
6
,7 @@
def checkNotUndoable(self):
self._transaction_store(oid1, revid1, p81, '', t)
self._transaction_store(oid2, revid2, p91, '', t)
self._transaction_vote(t)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment