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
ecad3244
Commit
ecad3244
authored
Mar 17, 2022
by
dieter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to fix race condition in test `runzeo_without_configfile`
parent
80715eae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
src/ZEO/runzeo.py
src/ZEO/runzeo.py
+1
-0
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+8
-4
No files found.
src/ZEO/runzeo.py
View file @
ecad3244
...
...
@@ -251,6 +251,7 @@ class ZEOServer(object):
def
loop_forever
(
self
):
if
self
.
options
.
testing_exit_immediately
:
print
(
"testing exit immediately"
)
sys
.
stdout
.
flush
()
# ensure truthful output order
else
:
self
.
server
.
loop
()
...
...
src/ZEO/tests/testZEO.py
View file @
ecad3244
...
...
@@ -1221,7 +1221,7 @@ def client_asyncore_thread_has_name():
"""
def
runzeo_without_configfile
():
"""
r
"""
>>> with open('runzeo', 'w') as r:
... _ = r.write('''
... import sys
...
...
@@ -1231,10 +1231,13 @@ def runzeo_without_configfile():
... ''' % sys.path)
>>> import subprocess, re
>>> pr
int(re.sub(br'
\
d
\
d+|[:]', b'',
subprocess.Popen(
>>> pr
oc =
subprocess.Popen(
... [sys.executable, 'runzeo', '-a:0', '-ft', '--test'],
... stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
... ).stdout.read()).decode('ascii'))
... )
>>> proc.wait()
0
>>> print(re.sub(br'\
d
\d+|[:]', b'', proc.stdout.read()).decode('ascii'))
... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
------
--T INFO ZEO.runzeo () opening storage '1' using FileStorage
...
...
@@ -1242,9 +1245,10 @@ def runzeo_without_configfile():
--T INFO ZEO.StorageServer StorageServer created RW with storages 1RWt
------
--T INFO ZEO.asyncio... listening on ...
testing exit immediately
------
--T INFO ZEO.StorageServer closing storage '1'
testing exit immediately
>>> proc.stdout.close()
"""
def
close_client_storage_w_invalidations
():
...
...
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