From 47e66580dbbceaffa30190fe48d965fe5d76b5a8 Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 4 Dec 2018 15:02:53 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20mix=20no=5Fpatience=20and=20bad?= =?UTF-8?q?=5Fspawn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this introduces a race between the early RuntimeError being tested and the no_patience causing handlers to return early if async start isn’t complete. With tornado coroutines, an early RuntimeError could be guaranteed to resolve promptly, but asyncio isn’t as consistent, possibly causing some of the recent flaky tests. --- jupyterhub/tests/test_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jupyterhub/tests/test_api.py b/jupyterhub/tests/test_api.py index d4e91cd0..80d7d777 100644 --- a/jupyterhub/tests/test_api.py +++ b/jupyterhub/tests/test_api.py @@ -718,7 +718,7 @@ def test_never_spawn(app, no_patience, never_spawn): @mark.gen_test -def test_bad_spawn(app, no_patience, bad_spawn): +def test_bad_spawn(app, bad_spawn): db = app.db name = 'prim' user = add_user(db, app=app, name=name) @@ -835,7 +835,7 @@ def test_progress_ready(request, app): @mark.gen_test -def test_progress_bad(request, app, no_patience, bad_spawn): +def test_progress_bad(request, app, bad_spawn): """Test progress API when spawner has already failed""" db = app.db name = 'simon'