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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
6d05cc16
Commit
6d05cc16
authored
Jun 09, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #24 from zopefoundation/fix22
Fix #22
parents
0bde3265
9ad70632
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
20 deletions
+58
-20
.travis.yml
.travis.yml
+26
-5
src/ZEO/tests/ConnectionTests.py
src/ZEO/tests/ConnectionTests.py
+4
-6
src/ZEO/tests/forker.py
src/ZEO/tests/forker.py
+4
-4
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+3
-3
src/ZEO/zrpc/client.py
src/ZEO/zrpc/client.py
+8
-1
src/ZEO/zrpc/server.py
src/ZEO/zrpc/server.py
+13
-1
No files found.
.travis.yml
View file @
6d05cc16
language
:
python
sudo
:
false
python
:
-
2.7
-
3.3
-
3.4
-
pypy
matrix
:
include
:
-
os
:
linux
python
:
2.7
-
os
:
linux
python
:
3.3
-
os
:
linux
python
:
3.4
-
os
:
linux
python
:
3.5
-
os
:
linux
python
:
pypy
-
os
:
osx
language
:
generic
env
:
TERRYFY_PYTHON='homebrew 2'
-
os
:
osx
language
:
generic
env
:
TERRYFY_PYTHON='macpython 3.4'
-
os
:
osx
language
:
generic
env
:
TERRYFY_PYTHON='homebrew 3'
before_install
:
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git clone https://github.com/MacPython/terryfy; fi
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source terryfy/travis_tools.sh; fi
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then get_python_environment $TERRYFY_PYTHON venv; fi
-
if [[ "$TERRYFY_PYTHON" == "homebrew 3" ]]; then alias pip=`which pip3` ; fi
install
:
-
pip install -U setuptools
-
python bootstrap.py
...
...
src/ZEO/tests/ConnectionTests.py
View file @
6d05cc16
...
...
@@ -609,6 +609,10 @@ class InvqTests(CommonSetupTearDown):
revid2
=
self
.
_dostore
(
oid2
)
revid2
=
self
.
_dostore
(
oid2
,
revid2
)
forker
.
wait_until
(
lambda
:
perstorage
.
lastTransaction
()
==
self
.
_storage
.
lastTransaction
())
perstorage
.
load
(
oid
,
''
)
perstorage
.
close
()
...
...
@@ -617,12 +621,6 @@ class InvqTests(CommonSetupTearDown):
revid
=
self
.
_dostore
(
oid
,
revid
)
perstorage
=
self
.
openClientStorage
(
cache
=
"test"
)
forker
.
wait_until
(
func
=
(
lambda
:
perstorage
.
verify_result
==
"quick verification"
),
timeout
=
60
,
label
=
"perstorage.verify_result to be quick verification"
)
self
.
assertEqual
(
perstorage
.
verify_result
,
"quick verification"
)
self
.
assertEqual
(
perstorage
.
_server
.
_last_invals
,
(
revid
,
[
oid
]))
...
...
src/ZEO/tests/forker.py
View file @
6d05cc16
...
...
@@ -161,10 +161,10 @@ def start_zeo_server(storage_conf=None, zeo_conf=None, port=None, keep=False,
else
:
pid
=
subprocess
.
Popen
(
args
,
env
=
d
,
close_fds
=
True
).
pid
# We need to wait until the server starts, but not forever.
#
30 seconds is a somewhat arbitrary upper bound. A BDBStorage
#
takes a long time to open -- more than 10 seconds on occas
ion.
for
i
in
range
(
3
00
):
# We need to wait until the server starts, but not forever.
150
#
seconds is a somewhat arbitrary upper bound, but probably helps
#
in an address already in use situat
ion.
for
i
in
range
(
15
00
):
time
.
sleep
(
0.1
)
try
:
if
isinstance
(
adminaddr
,
str
)
and
not
os
.
path
.
exists
(
adminaddr
):
...
...
src/ZEO/tests/testZEO.py
View file @
6d05cc16
...
...
@@ -1227,9 +1227,9 @@ def client_asyncore_thread_has_name():
"""
>>> addr, _ = start_server()
>>> db = ZEO.DB(addr)
>>>
len([
t for t in threading.enumerate()
...
if ' zeo client networking thread' in t.getName()]
)
1
>>>
any(
t for t in threading.enumerate()
...
if ' zeo client networking thread' in t.getName()
)
True
>>> db.close()
"""
...
...
src/ZEO/zrpc/client.py
View file @
6d05cc16
...
...
@@ -51,7 +51,7 @@ def client_loop(map):
try
:
r
,
w
,
e
=
select
.
select
(
r
,
w
,
e
,
client_timeout
())
except
select
.
error
as
err
:
except
(
select
.
error
,
RuntimeError
)
as
err
:
# Python >= 3.3 makes select.error an alias of OSError,
# which is not subscriptable but does have the 'errno' attribute
err_errno
=
getattr
(
err
,
'errno'
,
None
)
or
err
[
0
]
...
...
@@ -69,6 +69,13 @@ def client_loop(map):
if
[
fd
for
fd
in
w
if
fd
not
in
map
]:
continue
# Hm, on Mac OS X, we could get a run time
# error and end up here, but retrying select
# would work. Let's try:
select
.
select
(
r
,
w
,
e
,
0
)
# we survived, keep going :)
continue
raise
else
:
continue
...
...
src/ZEO/zrpc/server.py
View file @
6d05cc16
...
...
@@ -70,7 +70,19 @@ class Dispatcher(asyncore.dispatcher):
self
.
create_socket
(
socket
.
AF_UNIX
,
socket
.
SOCK_STREAM
)
self
.
set_reuse_addr
()
log
(
"listening on %s"
%
str
(
self
.
addr
),
logging
.
INFO
)
for
i
in
range
(
25
):
try
:
self
.
bind
(
self
.
addr
)
except
Exception
as
exc
:
log
(
"bind failed %s waiting"
,
i
)
if
i
==
24
:
raise
else
:
time
.
sleep
(
5
)
else
:
break
self
.
listen
(
5
)
def
writable
(
self
):
...
...
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