Commit 334eb91c authored by dieter's avatar dieter

merged in `master`

parents 3d6e7bdf 60c9d106
name: tests
on:
push:
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
# [Python version, tox env]
- ["2.7", "py27"]
- ["2.7", "py27-msgpack1"]
- ["2.7", "py27-zeo4"]
- ["2.7", "py27-zodbmaster"]
- ["3.5", "py35"]
- ["3.5", "py35-zeo4"]
- ["3.6", "py36"]
- ["3.6", "py36-mtacceptor"]
- ["3.6", "py36-mtacceptor-msgpack1"]
- ["3.7", "py37"]
- ["3.7", "py37-mtacceptor"]
- ["3.7", "py37-mtacceptor-msgpack1"]
- ["3.7", "py37-uvloop"]
- ["3.7", "py37-zodbmaster"]
- ["pypy2", "pypy"]
- ["pypy3", "pypy3"]
- ["pypy3", "pypy3-mtacceptor"]
- ["pypy3", "pypy3-mtacceptor-msgpack1"]
runs-on: ubuntu-latest
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
run: tox -e ${{ matrix.config[1] }}
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls coverage-python-version
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
.*.swp
*.pyc
__pycache__
*.egg-info
......
language: python
matrix:
include:
- os: linux
python: 2.7
- os: linux
python: pypy
- os: linux
python: 3.5
- os: linux
python: 3.6
- os: linux
python: 3.6
env: ZEO_MTACCEPTOR=1
- os: linux
python: 3.6
env: ZEO_MSGPACK=1 ZEO_MTACCEPTOR=1
- os: linux
python: 3.7
env: ZEO_MTACCEPTOR=1
dist: xenial
- os: linux
python: 3.7
env: ZEO_MSGPACK=1 ZEO_MTACCEPTOR=1
dist: xenial
- os: linux
python: pypy3
env: ZEO_MTACCEPTOR=1
- os: linux
python: pypy3
env: ZEO_MSGPACK=1 ZEO_MTACCEPTOR=1
- os: linux
python: 2.7
env: ZEO_MSGPACK=1
- os: linux
python: 2.7
env: ZEO4_SERVER=1
- os: linux
python: 3.5
env: ZEO4_SERVER=1
- os: linux
python: 3.7
env: BUILOUT_OPTIONS=extra=,uvloop
install:
- pip install zc.buildout
- buildout $BUILOUT_OPTIONS
cache:
directories:
- eggs
script:
- bin/test -vv -j3
notifications:
email: false
......@@ -10,9 +10,15 @@ Changelog
associated data corruption
`#166 <https://github.com/zopefoundation/ZEO/issues/166>`_.
- Add automated tests against the ZODB ``master`` branch
see `issue 177 <https://github.com/zopefoundation/ZEO/issues/177>`_.
- Fix data corruption due to race between load and external invalidations.
See `issue 155 <https://github.com/zopefoundation/ZEO/issues/155>`_.
- Improve log message when client cache is out of sync with server.
See `issue 142 <https://github.com/zopefoundation/ZEO/issues/142>`_.
5.2.2 (2020-08-11)
------------------
......@@ -20,7 +26,7 @@ Changelog
- Provide proper CA test certificates to allow the SSL tests succeed for Py3
- Replace deprecated occurences of ``Thread.isAlive()`` by ``Thread.is_alive()``
- Replace deprecated occurrences of ``Thread.isAlive()`` by ``Thread.is_alive()``
See `pull request 154 <https://github.com/zopefoundation/ZEO/pull/154>`_.
- Include both modified and just created objects into invalidations.
......
......@@ -497,7 +497,10 @@ class Client(object):
elif cache_tid > server_tid:
self.verify_result = "Cache newer than server"
logger.critical(
'Client has seen newer transactions than server!')
'Client cache is out of sync with the server. '
'Verify that this is expected and then remove '
'the cache file (usually a .zec file) '
'before restarting the server.')
raise AssertionError("Server behind client, %r < %r, %s",
server_tid, cache_tid, protocol)
elif cache_tid == server_tid:
......
......@@ -354,7 +354,7 @@ class ClientCache(object):
seek(maxsize)
f.truncate()
# We use the first_free_offset because it is most likelyt the
# We use the first_free_offset because it is most likely the
# place where we last wrote.
self.currentofs = first_free_offset or ZEC_HEADER_SIZE
self._len = l
......
......@@ -1147,7 +1147,7 @@ def client_has_newer_data_than_server():
>>> wait_until('got enough errors', lambda:
... len([x for x in handler.records
... if x.levelname == 'CRITICAL' and
... 'Client has seen newer transactions than server!' in x.msg
... 'Client cache is out of sync with the server.' in x.msg
... ]) >= 2)
Note that the errors repeat because the client keeps on trying to connect.
......
[tox]
envlist =
py27,py35,py36,py37,pypy,pypy3,simple,docs
py27
py35
py36
py37
pypy
pypy3
simple
docs
[testenv]
commands =
# Run unit tests first.
zope-testrunner -u --test-path=src --auto-color --auto-progress {posargs}
zope-testrunner -u --test-path=src {posargs:-vc}
# Only run functional tests if unit tests pass.
zope-testrunner -f --test-path=src --auto-color --auto-progress {posargs}
zope-testrunner -f --test-path=src {posargs:-vc}
deps =
ZODB >= 4.2.0b1
!zodbmaster: ZODB >= 4.2.0b1
zodbmaster: -e git+https://github.com/zopefoundation/ZODB.git@master#egg=ZODB
uvloop: uvloop
random2
ZConfig
manuel
......@@ -24,6 +33,11 @@ deps =
msgpack < 1
# ZopeUndo is needed as soft-dependency for a regression test
ZopeUndo
setenv =
!py27-!pypy: PYTHONWARNINGS=ignore::ResourceWarning
msgpack1: ZEO_MSGPACK=1
mtacceptor: ZEO_MTACCEPTOR=1
zeo4: ZEO4_SERVER=1
[testenv:simple]
# Test that 'setup.py test' works
......
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