Add timeout guard around caller side context open
parent
a4bc5f79ad
commit
a864f1e729
|
@ -265,6 +265,7 @@ async def test_callee_closes_ctx_after_stream_open():
|
|||
enable_modules=[__name__],
|
||||
)
|
||||
|
||||
with trio.fail_after(2):
|
||||
async with portal.open_context(
|
||||
close_ctx_immediately,
|
||||
|
||||
|
@ -297,6 +298,7 @@ async def test_callee_closes_ctx_after_stream_open():
|
|||
# of a stream to the context (at least until a time of
|
||||
# if/when we decide that's a good idea?)
|
||||
try:
|
||||
with trio.fail_after(0.5):
|
||||
async with ctx.open_stream() as stream:
|
||||
pass
|
||||
except trio.ClosedResourceError:
|
||||
|
|
Loading…
Reference in New Issue