def wait_until_result(clock, request, timeout=100):
    '\n    Wait until the request is finished.\n    '
    clock.run()
    x = 0
    while (not request.finished):
        if request._channel._producer:
            request._channel._producer.resumeProducing()
        x += 1
        if (x > timeout):
            raise TimedOutException('Timed out waiting for request to finish.')
        clock.advance(0.1)
Wait until the request is finished.
def wait_until_result(clock, request, timeout=100):
    '\n    \n    '
    clock.run()
    x = 0
    while (not request.finished):
        if request._channel._producer:
            request._channel._producer.resumeProducing()
        x += 1
        if (x > timeout):
            raise TimedOutException('Timed out waiting for request to finish.')
        clock.advance(0.1)