test inconsistent state if Spawner.start fails

This commit is contained in:
Min RK
2015-02-06 15:42:50 -08:00
parent c82903b85e
commit b4980f1736
2 changed files with 22 additions and 1 deletions

View File

@@ -322,9 +322,9 @@ class User(Base):
spawner.api_token = api_token
self.spawn_pending = True
f = spawner.start()
# wait for spawner.start to return
try:
f = spawner.start()
yield gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
except Exception as e:
if isinstance(e, gen.TimeoutError):