Skip to content

Commit

Permalink
Log in-flight requests count when timeout occurs
Browse files Browse the repository at this point in the history
  • Loading branch information
EvaSDK committed Oct 4, 2017
1 parent f45e897 commit a34ae95
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ghost/ghost.py
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,8 @@ def wait_for(self, condition, timeout_message, timeout=None):
started_at = time.time()
while not condition():
if time.time() > (started_at + timeout):
self.logger.debug('Timeout with %d requests still in flight',
self.manager.requests)
raise TimeoutError(timeout_message)
self.sleep(value=timeout / 10)
if self.wait_callback is not None:
Expand Down

0 comments on commit a34ae95

Please sign in to comment.