Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
3e4762b3
Commit
3e4762b3
authored
Jan 25, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dependence on StorageTestBase setUp() and tearDown().
parent
7de001c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+3
-13
No files found.
src/ZEO/tests/testZEO.py
View file @
3e4762b3
...
@@ -61,7 +61,7 @@ if hasattr(FileStorage, 'supportsTransactionalUndo'):
...
@@ -61,7 +61,7 @@ if hasattr(FileStorage, 'supportsTransactionalUndo'):
else
:
else
:
class
VersionDependentTests
:
class
VersionDependentTests
:
pass
pass
class
GenericTests
(
ZEOTestBase
,
class
GenericTests
(
ZEOTestBase
,
VersionDependentTests
,
VersionDependentTests
,
Cache
.
StorageWithCache
,
Cache
.
StorageWithCache
,
...
@@ -80,16 +80,12 @@ class GenericTests(ZEOTestBase,
...
@@ -80,16 +80,12 @@ class GenericTests(ZEOTestBase,
returns a specific storage, e.g. FileStorage.
returns a specific storage, e.g. FileStorage.
"""
"""
__super_setUp
=
StorageTestBase
.
StorageTestBase
.
setUp
__super_tearDown
=
StorageTestBase
.
StorageTestBase
.
tearDown
def
setUp
(
self
):
def
setUp
(
self
):
"""Start a ZEO server using a Unix domain socket
"""Start a ZEO server using a Unix domain socket
The ZEO server uses the storage object returned by the
The ZEO server uses the storage object returned by the
getStorage() method.
getStorage() method.
"""
"""
self
.
__super_setUp
()
self
.
running
=
1
self
.
running
=
1
client
,
exit
,
pid
=
forker
.
start_zeo
(
self
.
getStorage
())
client
,
exit
,
pid
=
forker
.
start_zeo
(
self
.
getStorage
())
self
.
_pid
=
pid
self
.
_pid
=
pid
...
@@ -100,10 +96,10 @@ class GenericTests(ZEOTestBase,
...
@@ -100,10 +96,10 @@ class GenericTests(ZEOTestBase,
def
tearDown
(
self
):
def
tearDown
(
self
):
"""Try to cause the tests to halt"""
"""Try to cause the tests to halt"""
self
.
running
=
0
self
.
running
=
0
self
.
_storage
.
close
()
self
.
_server
.
close
()
self
.
_server
.
close
()
os
.
waitpid
(
self
.
_pid
,
0
)
os
.
waitpid
(
self
.
_pid
,
0
)
self
.
delStorage
()
self
.
delStorage
()
self
.
__super_tearDown
()
def
checkLargeUpdate
(
self
):
def
checkLargeUpdate
(
self
):
obj
=
MinPO
(
"X"
*
(
10
*
128
*
1024
))
obj
=
MinPO
(
"X"
*
(
10
*
128
*
1024
))
...
@@ -138,11 +134,8 @@ class WindowsGenericTests(GenericTests):
...
@@ -138,11 +134,8 @@ class WindowsGenericTests(GenericTests):
can't be created in the parent process and passed to the child.
can't be created in the parent process and passed to the child.
All the work has to be done in the server's process.
All the work has to be done in the server's process.
"""
"""
__super_setUp
=
StorageTestBase
.
StorageTestBase
.
setUp
__super_tearDown
=
StorageTestBase
.
StorageTestBase
.
tearDown
def
setUp
(
self
):
def
setUp
(
self
):
self
.
__super_setUp
()
args
=
self
.
getStorageInfo
()
args
=
self
.
getStorageInfo
()
name
=
args
[
0
]
name
=
args
[
0
]
args
=
args
[
1
:]
args
=
args
[
1
:]
...
@@ -162,7 +155,6 @@ class WindowsGenericTests(GenericTests):
...
@@ -162,7 +155,6 @@ class WindowsGenericTests(GenericTests):
## os.waitpid(self.test_pid, 0)
## os.waitpid(self.test_pid, 0)
time
.
sleep
(
0.5
)
time
.
sleep
(
0.5
)
self
.
delStorage
()
self
.
delStorage
()
self
.
__super_tearDown
()
class
WindowsZEOFileStorageTests
(
WindowsGenericTests
):
class
WindowsZEOFileStorageTests
(
WindowsGenericTests
):
...
@@ -186,8 +178,6 @@ class ConnectionTests(ZEOTestBase):
...
@@ -186,8 +178,6 @@ class ConnectionTests(ZEOTestBase):
start and stop a ZEO storage server.
start and stop a ZEO storage server.
"""
"""
__super_tearDown
=
StorageTestBase
.
StorageTestBase
.
tearDown
ports
=
[]
ports
=
[]
for
i
in
range
(
200
):
for
i
in
range
(
200
):
ports
.
append
(
random
.
randrange
(
25000
,
30000
))
ports
.
append
(
random
.
randrange
(
25000
,
30000
))
...
@@ -203,6 +193,7 @@ class ConnectionTests(ZEOTestBase):
...
@@ -203,6 +193,7 @@ class ConnectionTests(ZEOTestBase):
def
tearDown
(
self
):
def
tearDown
(
self
):
"""Try to cause the tests to halt"""
"""Try to cause the tests to halt"""
self
.
_storage
.
close
()
self
.
shutdownServer
()
self
.
shutdownServer
()
# file storage appears to create four files
# file storage appears to create four files
for
ext
in
''
,
'.index'
,
'.lock'
,
'.tmp'
:
for
ext
in
''
,
'.index'
,
'.lock'
,
'.tmp'
:
...
@@ -213,7 +204,6 @@ class ConnectionTests(ZEOTestBase):
...
@@ -213,7 +204,6 @@ class ConnectionTests(ZEOTestBase):
path
=
"c1-test-%d.zec"
%
i
path
=
"c1-test-%d.zec"
%
i
if
os
.
path
.
exists
(
path
):
if
os
.
path
.
exists
(
path
):
os
.
unlink
(
path
)
os
.
unlink
(
path
)
self
.
__super_tearDown
()
def
checkBasicPersistence
(
self
):
def
checkBasicPersistence
(
self
):
"""Verify cached data persists across client storage instances.
"""Verify cached data persists across client storage instances.
...
...
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