Commit 7eedfd75 authored by Jim Fulton's avatar Jim Fulton Committed by GitHub

Merge pull request #65 from zopefoundation/travis-caching

try caching again, off on a separate branch.
parents d9ef8853 0fafa40a
...@@ -26,6 +26,9 @@ matrix: ...@@ -26,6 +26,9 @@ matrix:
install: install:
- pip install zc.buildout - pip install zc.buildout
- buildout - buildout
cache:
directories:
- eggs
script: script:
- bin/test -v1j99 - bin/test -v1j99
notifications: notifications:
......
...@@ -166,23 +166,28 @@ def runner(config, qin, qout, timeout=None, ...@@ -166,23 +166,28 @@ def runner(config, qin, qout, timeout=None,
ZEO.asyncio.server.best_protocol_version = old_protocol ZEO.asyncio.server.best_protocol_version = old_protocol
ZEO.asyncio.server.ServerProtocol.protocols = old_protocols ZEO.asyncio.server.ServerProtocol.protocols = old_protocols
def stop_runner(thread, config, qin, qout, stop_timeout=9, pid=None): def stop_runner(thread, config, qin, qout, stop_timeout=19, pid=None):
qin.put('stop') qin.put('stop')
dirty = qout.get(timeout=stop_timeout) try:
if dirty: dirty = qout.get(timeout=stop_timeout)
print("WARNING SERVER DIDN'T STOP CLEANLY", file=sys.stderr) except Empty:
print("WARNING Couldn't stop server", file=sys.stderr)
# The runner thread didn't stop. If it was a process, if hasattr(thread, 'terminate'):
# give it some time to exit thread.terminate()
if hasattr(thread, 'pid') and thread.pid:
os.waitpid(thread.pid, 0) os.waitpid(thread.pid, 0)
else: else:
# Gaaaa, force gc in hopes of maybe getting the unclosed if dirty:
# sockets to get GCed print("WARNING SERVER DIDN'T STOP CLEANLY", file=sys.stderr)
gc.collect()
# The runner thread didn't stop. If it was a process,
# give it some time to exit
if hasattr(thread, 'pid') and thread.pid:
os.waitpid(thread.pid, 0)
thread.join(stop_timeout) thread.join(stop_timeout)
gc.collect()
def start_zeo_server(storage_conf=None, zeo_conf=None, port=None, keep=False, def start_zeo_server(storage_conf=None, zeo_conf=None, port=None, keep=False,
path='Data.fs', protocol=None, blob_dir=None, path='Data.fs', protocol=None, blob_dir=None,
suicide=True, debug=False, suicide=True, debug=False,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment