Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
92e49851
Commit
92e49851
authored
Jul 07, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
run pre-defined conflict-resolution tests with client-side conflict resolution
parent
4cdbf8b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
25 deletions
+31
-25
src/ZEO/tests/forker.py
src/ZEO/tests/forker.py
+2
-1
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+29
-24
No files found.
src/ZEO/tests/forker.py
View file @
92e49851
...
...
@@ -33,7 +33,7 @@ logger = logging.getLogger('ZEO.tests.forker')
class
ZEOConfig
:
"""Class to generate ZEO configuration file. """
def
__init__
(
self
,
addr
):
def
__init__
(
self
,
addr
,
**
options
):
if
isinstance
(
addr
,
str
):
self
.
logpath
=
addr
+
'.log'
else
:
...
...
@@ -42,6 +42,7 @@ class ZEOConfig:
self
.
address
=
addr
self
.
read_only
=
None
self
.
loglevel
=
'INFO'
self
.
__dict__
.
update
(
options
)
def
dump
(
self
,
f
):
print
(
"<zeo>"
,
file
=
f
)
...
...
src/ZEO/tests/testZEO.py
View file @
92e49851
...
...
@@ -143,23 +143,9 @@ class MiscZEOTests:
self
.
assertNotEquals
(
ZODB
.
utils
.
z64
,
storage3
.
lastTransaction
())
storage3
.
close
()
class
GenericTest
s
(
class
GenericTest
Base
(
# Base class for all ZODB tests
StorageTestBase
.
StorageTestBase
,
# ZODB test mixin classes (in the same order as imported)
BasicStorage
.
BasicStorage
,
PackableStorage
.
PackableStorage
,
Synchronization
.
SynchronizedStorage
,
MTStorage
.
MTStorage
,
ReadOnlyStorage
.
ReadOnlyStorage
,
# ZEO test mixin classes (in the same order as imported)
CommitLockTests
.
CommitLockVoteTests
,
ThreadTests
.
ThreadTests
,
# Locally defined (see above)
MiscZEOTests
,
):
"""Combine tests from various origins in one class."""
StorageTestBase
.
StorageTestBase
):
shared_blob_dir
=
False
blob_cache_dir
=
None
...
...
@@ -200,14 +186,23 @@ class GenericTests(
stop
()
StorageTestBase
.
StorageTestBase
.
tearDown
(
self
)
def
runTest
(
self
):
try
:
super
(
GenericTests
,
self
).
runTest
()
except
:
self
.
_failed
=
True
raise
else
:
self
.
_failed
=
False
class
GenericTests
(
GenericTestBase
,
# ZODB test mixin classes (in the same order as imported)
BasicStorage
.
BasicStorage
,
PackableStorage
.
PackableStorage
,
Synchronization
.
SynchronizedStorage
,
MTStorage
.
MTStorage
,
ReadOnlyStorage
.
ReadOnlyStorage
,
# ZEO test mixin classes (in the same order as imported)
CommitLockTests
.
CommitLockVoteTests
,
ThreadTests
.
ThreadTests
,
# Locally defined (see above)
MiscZEOTests
,
):
"""Combine tests from various origins in one class.
"""
def
open
(
self
,
read_only
=
0
):
# Needed to support ReadOnlyStorage tests. Ought to be a
...
...
@@ -394,7 +389,16 @@ class FileStorageClientHexTests(FileStorageHexTests):
def
_wrap_client
(
self
,
client
):
return
ZODB
.
tests
.
hexstorage
.
HexStorage
(
client
)
class
ClientConflictResolutionTests
(
GenericTestBase
,
ConflictResolution
.
ConflictResolvingStorage
,
):
def
getConfig
(
self
):
return
'<mappingstorage>
\
n
</mappingstorage>
\
n
'
def
getZEOConfig
(
self
):
return
forker
.
ZEOConfig
((
''
,
0
),
client_conflict_resolution
=
True
)
class
MappingStorageTests
(
GenericTests
):
"""ZEO backed by a Mapping storage."""
...
...
@@ -1597,6 +1601,7 @@ def test_suite():
"ClientDisconnected"),
)),
))
zeo.addTest(unittest.makeSuite(ClientConflictResolutionTests, '
check
'))
zeo.layer = ZODB.tests.util.MininalTestLayer('
testZeo
-
misc
')
suite.addTest(zeo)
...
...
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