Skip to content

Commit

Permalink
Test runzeo msgpack support
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Nov 12, 2016
1 parent 07eb7fd commit 24b8ff8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/ZEO/tests/testZEO.py
Expand Up @@ -1462,6 +1462,35 @@ def ClientDisconnected_errors_are_TransientErrors():
True
"""

if os.environ.get('ZEO_MSGPACK'):
def test_runzeo_msgpack_support():
"""
>>> import ZEO
>>> a, s = ZEO.server()
>>> conn = ZEO.connection(a)
>>> str(conn.db().storage.protocol_version.decode('ascii'))
'M5'
>>> conn.close(); s()
"""
else:
def test_runzeo_msgpack_support():
"""
>>> import ZEO
>>> a, s = ZEO.server()
>>> conn = ZEO.connection(a)
>>> str(conn.db().storage.protocol_version.decode('ascii'))
'Z5'
>>> conn.close(); s()
>>> a, s = ZEO.server(zeo_conf=dict(msgpack=True))
>>> conn = ZEO.connection(a)
>>> str(conn.db().storage.protocol_version.decode('ascii'))
'M5'
>>> conn.close(); s()
"""

if sys.platform.startswith('win'):
del runzeo_logrotate_on_sigusr2
del unix_domain_sockets
Expand Down

0 comments on commit 24b8ff8

Please sign in to comment.