exercise start/stop race conditions

this doesn’t cover all the edge cases of each possible stage for the races, but it gets the basics covered.
This commit is contained in:
Min RK
2017-08-26 11:57:05 -04:00
parent 37da47d811
commit 8e3553462c
3 changed files with 49 additions and 2 deletions

View File

@@ -514,7 +514,7 @@ class BaseHandler(RequestHandler):
raise KeyError("User %s has no such spawner %r", user.name, name)
spawner = user.spawners[name]
if spawner.pending:
raise RuntimeError("%s pending %s" % (user_server_name, spawner.pending))
raise RuntimeError("%s pending %s" % (spawner._log_name, spawner.pending))
# set user._stop_pending before doing anything async
# to avoid races
spawner._stop_pending = True