Commit 53127d52 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 310b2283
......@@ -34,10 +34,11 @@ from persistent.timestamp import TimeStamp
import os, os.path, subprocess, threading
from errno import EINVAL
from golang import go, chan, func, defer, select
from golang import chan, func, defer, select
from golang import context, sync
from zodbtools.util import ashex as h, fromhex
from pytest import raises
from six import reraise
from .internal import mm
# setup:
......@@ -438,7 +439,12 @@ class tWatch:
# XXX in particular if there is a silly - e.g. syntax or type error in
# test code - we curently get stuck here.
print('# serveDone.recv() ...')
t._serveWG.wait()
try:
t._serveWG.wait()
except Exception as e:
# canceled is expected and ok
if e != context.canceled:
reraise(e, None, e.__traceback__)
print('# serveDone ready')
t.wtx.close()
......@@ -477,7 +483,7 @@ class tWatch:
(rxq.send, msg), # 1
)
if _ == 0:
raise ctx.err() # XXX ok? -> or just return?
raise ctx.err()
else:
with t._rxmu:
assert stream not in t._accepted
......@@ -487,7 +493,7 @@ class tWatch:
(t._acceptq.send, (stream, msg)), # 1
)
if _ == 0:
raise ctx.err() # XXX ok? -> or just return?
raise ctx.err()
# _send sends raw message via specified stream.
......
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