Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timeouts to processes in SSH tests #2925

Merged
merged 1 commit into from Aug 4, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -34,11 +34,13 @@ def __init__(self, **kwargs):

async def start(self):
assert self.connection
weakref.finalize(self, self.proc.terminate)
weakref.finalize(
self, self.proc.kill
) # https://github.com/ronf/asyncssh/issues/112
await super().start()

async def close(self):
self.proc.terminate()
self.proc.kill() # https://github.com/ronf/asyncssh/issues/112
self.connection.close()
await super().close()

@@ -12,7 +12,8 @@
["127.0.0.1"] * 3,
connect_kwargs=dict(known_hosts=None),
asynchronous=True,
scheduler_kwargs={"port": 0},
scheduler_kwargs={"port": 0, "idle_timeout": "5s"},
worker_kwargs={"death_timeout": "5s"},
) as cluster:
assert len(cluster.workers) == 2
async with Client(cluster, asynchronous=True) as client:
@@ -29,7 +30,7 @@
["127.0.0.1"] * 3,
connect_kwargs=dict(known_hosts=None),
asynchronous=True,
worker_kwargs={"nthreads": 2, "memory_limit": "2 GiB"},
worker_kwargs={"nthreads": 2, "memory_limit": "2 GiB", "death_timeout": "5s"},
scheduler_kwargs={"idle_timeout": "5s", "port": 0},
) as cluster:
async with Client(cluster, asynchronous=True) as client:
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.