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
8375ad9f
Commit
8375ad9f
authored
Aug 24, 2001
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge updates for Windows test success from the trunk
parent
b7e27555
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+17
-15
No files found.
src/ZEO/tests/testZEO.py
View file @
8375ad9f
...
@@ -222,10 +222,12 @@ class ConnectionTests(ZEOTestBase):
...
@@ -222,10 +222,12 @@ class ConnectionTests(ZEOTestBase):
start and stop a ZEO storage server.
start and stop a ZEO storage server.
"""
"""
ports
=
range
(
29000
,
30000
,
10
)
# enough for 100 tests
__super_setUp
=
StorageTestBase
.
StorageTestBase
.
setUp
random
.
shuffle
(
ports
)
__super_tearDown
=
StorageTestBase
.
StorageTestBase
.
tearDown
ports
=
[]
for
i
in
range
(
200
):
ports
.
append
(
random
.
randrange
(
25000
,
30000
))
del
i
def
openClientStorage
(
self
,
cache
=
''
,
cache_size
=
200000
,
wait
=
1
):
def
openClientStorage
(
self
,
cache
=
''
,
cache_size
=
200000
,
wait
=
1
):
# defined by subclasses
# defined by subclasses
...
@@ -302,11 +304,16 @@ class ConnectionTests(ZEOTestBase):
...
@@ -302,11 +304,16 @@ class ConnectionTests(ZEOTestBase):
while
1
:
while
1
:
try
:
try
:
revid1
=
self
.
_dostore
(
oid
,
data
=
obj
)
revid1
=
self
.
_dostore
(
oid
,
data
=
obj
)
except
(
ClientDisconnected
,
thread
.
error
),
err
:
except
(
ClientDisconnected
,
thread
.
error
,
socket
.
error
),
err
:
get_transaction
().
abort
()
get_transaction
().
abort
()
time
.
sleep
(
0.1
)
time
.
sleep
(
0.1
)
else
:
else
:
break
break
# XXX This is a bloody pain. We're placing a heavy burden
# on users to catch a plethora of exceptions in order to
# write robust code. Need to think about implementing
# John Heintz's suggestion to make sure all exceptions
# inherit from POSException.
class
UnixConnectionTests
(
ConnectionTests
):
class
UnixConnectionTests
(
ConnectionTests
):
__super_setUp
=
StorageTestBase
.
StorageTestBase
.
setUp
__super_setUp
=
StorageTestBase
.
StorageTestBase
.
setUp
...
@@ -405,20 +412,15 @@ else:
...
@@ -405,20 +412,15 @@ else:
def
makeTestSuite
(
testname
=
''
):
def
makeTestSuite
(
testname
=
''
):
suite
=
unittest
.
TestSuite
()
suite
=
unittest
.
TestSuite
()
name
=
'check'
+
testname
name
=
'check'
+
testname
for
klass
in
ZEOFileStorageTests
,
ConnectionTests
:
lname
=
len
(
name
)
for
klass
in
test_classes
:
for
meth
in
get_methods
(
klass
):
for
meth
in
get_methods
(
klass
):
if
meth
.
startswith
(
name
)
:
if
meth
[:
lname
]
==
name
:
suite
.
addTest
(
klass
(
meth
))
suite
.
addTest
(
klass
(
meth
))
return
suite
return
suite
def
test_suite
():
def
test_suite
():
t
=
unittest
.
TestLoader
()
return
makeTestSuite
()
t
.
testMethodPrefix
=
'check'
tests
=
[]
for
klass
in
test_classes
:
s
=
t
.
loadTestsFromTestCase
(
klass
)
tests
.
extend
(
s
.
_tests
)
return
unittest
.
TestSuite
(
tests
)
def
main
():
def
main
():
import
sys
,
getopt
import
sys
,
getopt
...
...
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