Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
2e3e2c60
Commit
2e3e2c60
authored
Mar 12, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
edaf43c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
lib/tests/test_zodb.py
lib/tests/test_zodb.py
+10
-8
No files found.
lib/tests/test_zodb.py
View file @
2e3e2c60
...
...
@@ -247,17 +247,19 @@ def test_zconn_at():
at0
=
stor
.
lastTransaction
()
# open connection, it must be viewing the database @at0
conn1
=
db
.
open
()
tm1
=
TransactionManager
()
conn1
=
db
.
open
(
transaction_manager
=
tm1
)
assert
zconn_at
(
conn1
)
==
at0
# open another simultaneous connection
conn2
=
db
.
open
()
tm2
=
TransactionManager
()
conn2
=
db
.
open
(
transaction_manager
=
tm2
)
assert
zconn_at
(
conn2
)
==
at0
# commit
root1
=
conn1
.
root
()
root1
[
'z'
]
=
1
t
ransaction
.
commit
()
t
m1
.
commit
()
# after commit conn1 view is updated; conn2 view stays @at0
zsync
(
stor
)
...
...
@@ -270,7 +272,7 @@ def test_zconn_at():
with
raises
(
POSException
.
ConnectionStateError
):
zconn_at
(
conn1
)
assert
zconn_at
(
conn2
)
==
at0
conn1_
=
db
.
open
()
conn1_
=
db
.
open
(
transaction_manager
=
tm1
)
assert
conn1_
is
conn1
# returned from DB pool
assert
zconn_at
(
conn1
)
==
at1
assert
zconn_at
(
conn2
)
==
at0
...
...
@@ -280,11 +282,11 @@ def test_zconn_at():
#
# TODO zconn_at after empty commit (with fs1 currently gives future tid,
# but db is not updated and wcfs client resync to that future tid hangs)
conn1_
=
db
.
open
()
assert
conn1_
is
conn
2
# from DB pool
conn1_
=
db
.
open
(
transaction_manager
=
tm1
)
assert
conn1_
is
conn
1
# from DB pool
assert
zconn_at
(
conn1
)
==
at1
assert
zconn_at
(
conn2
)
==
at0
t
ransaction
.
commit
()
t
m1
.
commit
()
zsync
(
stor
)
at1_
=
stor
.
lastTransaction
()
...
...
@@ -294,7 +296,7 @@ def test_zconn_at():
# reopen conn2 -> view upated to @at1_
conn2
.
close
()
conn2_
=
db
.
open
()
conn2_
=
db
.
open
(
transaction_manager
=
tm1
)
assert
conn2_
is
conn2
# from DB pool
assert
zconn_at
(
conn1
)
==
at1_
assert
zconn_at
(
conn2
)
==
at1_
...
...
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