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
52913651
Commit
52913651
authored
Jan 09, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add option to enable monitor server.
parent
29af8b6b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
src/ZEO/tests/ConnectionTests.py
src/ZEO/tests/ConnectionTests.py
+3
-1
src/ZEO/tests/forker.py
src/ZEO/tests/forker.py
+4
-1
src/ZEO/tests/zeoserver.py
src/ZEO/tests/zeoserver.py
+6
-2
No files found.
src/ZEO/tests/ConnectionTests.py
View file @
52913651
...
...
@@ -61,6 +61,7 @@ class CommonSetupTearDown(StorageTestBase):
keep
=
0
invq
=
None
timeout
=
None
monitor
=
0
def
setUp
(
self
):
"""Test setup for connection tests.
...
...
@@ -132,7 +133,8 @@ class CommonSetupTearDown(StorageTestBase):
path
=
"%s.%d"
%
(
self
.
file
,
index
)
conf
=
self
.
getConfig
(
path
,
create
,
read_only
)
zeoport
,
adminaddr
,
pid
=
forker
.
start_zeo_server
(
conf
,
addr
,
ro_svr
,
self
.
keep
,
self
.
invq
,
self
.
timeout
)
conf
,
addr
,
ro_svr
,
self
.
monitor
,
self
.
keep
,
self
.
invq
,
self
.
timeout
)
self
.
_pids
.
append
(
pid
)
self
.
_servers
.
append
(
adminaddr
)
...
...
src/ZEO/tests/forker.py
View file @
52913651
...
...
@@ -51,7 +51,7 @@ def get_port():
raise
RuntimeError
,
"Can't find port"
def
start_zeo_server
(
conf
,
addr
=
None
,
ro_svr
=
0
,
keep
=
0
,
invq
=
None
,
def
start_zeo_server
(
conf
,
addr
=
None
,
ro_svr
=
0
,
monitor
=
0
,
keep
=
0
,
invq
=
None
,
timeout
=
None
):
"""Start a ZEO server in a separate process.
...
...
@@ -82,6 +82,9 @@ def start_zeo_server(conf, addr=None, ro_svr=0, keep=0, invq=None,
args
+=
[
'-Q'
,
str
(
invq
)]
if
timeout
:
args
+=
[
'-T'
,
str
(
timeout
)]
if
monitor
:
# XXX Is it safe to reuse the port?
args
+=
[
'-m'
,
'42000'
]
args
.
append
(
str
(
port
))
d
=
os
.
environ
.
copy
()
d
[
'PYTHONPATH'
]
=
os
.
pathsep
.
join
(
sys
.
path
)
...
...
src/ZEO/tests/zeoserver.py
View file @
52913651
...
...
@@ -135,8 +135,9 @@ def main():
configfile
=
None
invalidation_queue_size
=
100
transaction_timeout
=
None
monitor_address
=
None
# Parse the arguments and let getopt.error percolate
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'rkC:Q:T:'
)
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'rkC:Q:T:
m:
'
)
for
opt
,
arg
in
opts
:
if
opt
==
'-r'
:
ro_svr
=
1
...
...
@@ -148,6 +149,8 @@ def main():
invalidation_queue_size
=
int
(
arg
)
elif
opt
==
'-T'
:
transaction_timeout
=
int
(
arg
)
elif
opt
==
"-m"
:
monitor_address
=
''
,
int
(
arg
)
# Open the config file and let ZConfig parse the data there. Then remove
# the config file, otherwise we'll leave turds.
fp
=
open
(
configfile
,
'r'
)
...
...
@@ -163,7 +166,8 @@ def main():
serv
=
ZEO
.
StorageServer
.
StorageServer
(
addr
,
{
'1'
:
storage
},
ro_svr
,
invalidation_queue_size
=
invalidation_queue_size
,
transaction_timeout
=
transaction_timeout
)
transaction_timeout
=
transaction_timeout
,
monitor_address
=
monitor_address
)
try
:
log
(
label
,
'creating the test server, ro: %s, keep: %s'
,
ro_svr
,
keep
)
t
=
ZEOTestServer
(
test_addr
,
serv
,
keep
)
...
...
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