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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
c922735b
Commit
c922735b
authored
Apr 01, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d9e13fbe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
lib/tests/test_zodb.py
lib/tests/test_zodb.py
+7
-2
lib/tests/testprog/zopenrace.py
lib/tests/testprog/zopenrace.py
+6
-1
No files found.
lib/tests/test_zodb.py
View file @
c922735b
...
...
@@ -23,6 +23,7 @@ from wendelin.lib import testing
from
persistent
import
Persistent
,
UPTODATE
,
GHOST
,
CHANGED
from
ZODB
import
DB
,
POSException
from
ZODB.FileStorage
import
FileStorage
from
ZODB.MappingStorage
import
MappingStorage
from
BTrees.IOBTree
import
IOBTree
import
transaction
from
transaction
import
TransactionManager
...
...
@@ -291,7 +292,7 @@ def test_zconn_at():
assert
zconn_at
(
conn2
)
==
at0
# reopen conn2 -> view upated to @at1_
# reopen conn2 -> view up
d
ated to @at1_
conn2
.
close
()
conn2_
=
db
.
open
(
transaction_manager
=
tm1
)
assert
conn2_
is
conn2
# from DB pool
...
...
@@ -373,13 +374,17 @@ def test_zurlstable():
# ---- tests for critical properties of ZODB ----
# verify race in between Connection.open and invalidations.
def
test_zodb_zopenrace_basic
():
# exercises mostly logic inside ZODB around ZODB.Connection
zopenrace
.
test
(
MappingStorage
())
def
test_zodb_zopenrace
():
# exercises ZODB.Connection + particular storage implementation
zopenrace
.
main
()
# verify race in between loading and invalidations.
def
test_zodb_zloadrace
():
# skip testing with FileStorage - in ZODB/py opening simultaneous read-write
# connections to the same file is not supported and will raise Lock
e
rror.
# connections to the same file is not supported and will raise Lock
E
rror.
_
=
testdb
.
getZODBStorage
()
_
.
close
()
if
isinstance
(
_
,
FileStorage
):
...
...
lib/tests/testprog/zopenrace.py
View file @
c922735b
...
...
@@ -111,8 +111,13 @@ def main():
defer
(
tdb
.
teardown
)
zstor
=
tdb
.
getZODBStorage
()
db
=
DB
(
zstor
)
defer
(
zstor
.
close
)
test
(
zstor
)
@
func
def
test
(
zstor
):
db
=
DB
(
zstor
)
defer
(
db
.
close
)
# init initializes the database with two integer objects - obj1/obj2 that are set to 0.
def
init
():
...
...
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