# polling pydantic_v2.BaseModel
wait through pending states
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  start = LroHandle(phase='pending', polls=0)
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: running] b''
  > GET https://api.example.com/jobs/j1/report
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  wait = Report(rows=3)
  wait again = Report(rows=3)
  status after success = PollSnapshot(state='done', terminal=True, status=200, data=Job:j1)
  progress {'polls': 3}
poll one at a time
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  status = PollSnapshot(state='running', terminal=False, status=200, data=Job:j1)
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: running] b''
  status = PollSnapshot(state='done', terminal=True, status=200, data=Job:j1)
  > GET https://api.example.com/jobs/j1/report
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  wait = Report(rows=4)
  status after the block ! ConfigurationError: ConfigurationError(reason='invalid_state', field_path='status.closed') [field_path=('status', 'closed')] invalid_state
  close again = None
sleep through a short interval
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1/report
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  wait = Report(rows=5)
failed and cancelled operations
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  wait ! ProtocolDataError: status=200 data=Job:j1 operation_failed
  wait again ! ProtocolDataError: status=200 data=Job:j1 operation_failed
  status = PollSnapshot(state='failed', terminal=True, status=200, data=Job:j1)
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  status = PollSnapshot(state='cancelled', terminal=True, status=200, data=Job:j1)
  wait ! ProtocolDataError: status=200 data=Job:j1 operation_cancelled
unknown and missing states
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  unknown state ! ProtocolDataError: ProtocolDataError(operation_id='getJob', reason='value') [operation_id='getJob', location=BodySelector(pointer='/status')] value
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  state of another type ! ProtocolDataError: ProtocolDataError(operation_id='getJob', reason='type') [operation_id='getJob', location=BodySelector(pointer='/status')] type
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  missing state ! ProtocolDataError: ProtocolDataError(operation_id='getJob', reason='missing') [operation_id='getJob', location=BodySelector(pointer='/status')] missing
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  status after them = PollSnapshot(state='queued', terminal=False, status=200, data=Job:j1)
create responses
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  unaccepted success status ! ProtocolDataError: ProtocolDataError(operation_id='createJob', reason='value') [operation_id='createJob', location=StatusSelector()] value
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  missing operation id ! ProtocolDataError: ProtocolDataError(operation_id='createJob', reason='missing') [operation_id='createJob', location=BodySelector(pointer='/id')] missing
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  dot segment operation id ! ProtocolDataError: ProtocolDataError(operation_id='createJob', reason='value') [operation_id='createJob', location=BodySelector(pointer='/id')] value
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  create error ! InternalServerError: Error code: 500 - {"message":"down"} [operation_id='createJob', status_code=500, body=b'{"message":"down"}', body_bytes=b'{"message":"down"}', truncated=False]
options
  poll options of another type ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='poll_options') [field_path=('poll_options',)] invalid_value
  fixed idempotency key ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='options.idempotency_key') [field_path=('options', 'idempotency_key')] invalid_value
  patched written header ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='options.extra_headers.x-trace') [field_path=('options', 'extra_headers', 'x-trace')] invalid_value
  patched written query ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='options.extra_query.verbose') [field_path=('options', 'extra_query', 'verbose')] invalid_value
inline results
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j2?verbose=true
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  > GET https://api.example.com/jobs/j2?verbose=true
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  wait = Report(rows=7)
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j2?verbose=true
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  wait without a result ! ProtocolDataError: ProtocolDataError(operation_id='getJob', reason='missing') [operation_id='getJob', location=BodySelector(pointer='/result')] missing
  > GET https://api.example.com/jobs/j2?verbose=true
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  wait again = Report(rows=8)
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j2?verbose=true
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  repeated state header ! ProtocolDataError: ProtocolDataError(operation_id='getJob', reason='malformed') [operation_id='getJob', location=HeaderSelector(name='X-State', occurrence='single')] malformed
immediate results
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  start = LroHandle(phase='succeeded', polls=0)
  wait = Report(rows=1)
  status ! ConfigurationError: ConfigurationError(reason='invalid_state', field_path='status.succeeded') [field_path=('status', 'succeeded')] invalid_state
  progress {'polls': 0}
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  immediate null result ! ProtocolDataError: ProtocolDataError(operation_id='createJob', reason='null') [operation_id='createJob', location=BodySelector(pointer='/result')] null
fetch with a body and poll with the previous status
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j4?since=202
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  > GET https://api.example.com/jobs/j4?since=200
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  > POST https://api.example.com/reports
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 12] b'{"job":"j4"}'
  wait = Report(rows=6)
querystring polls
  > POST https://api.example.com/exports
    [host: api.example.com, content-length: 0, accept-encoding: gzip, deflate] b''
  > GET https://api.example.com/exports/status?%7B%22id%22%3A%22e1%22%7D
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  > GET https://api.example.com/exports/status?%7B%22id%22%3A%22e1%22%7D
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  wait without a result = None
  > POST https://api.example.com/exports
    [host: api.example.com, content-length: 0, accept-encoding: gzip, deflate] b''
  > GET https://api.example.com/exports/status?%7B%22id%22%3A%22e1%22%7D
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  failed export ! ProtocolDataError: status=200 data=ExportState:None operation_failed
  > POST https://api.example.com/exports
    [host: api.example.com, content-length: 0, accept-encoding: gzip, deflate] b''
  > GET https://api.example.com/exports/status
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  > GET https://api.example.com/reports/latest
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  fetch without bindings = Report(rows=9)
server delays
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  status after a long create delay ! SessionLimitError reason='wait' required>limit=True limit=60.0
  progress {'polls': 0}
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  status after a retried poll = PollSnapshot(state='queued', terminal=False, status=200, data=Job:j1)
  status after its delay ! SessionLimitError reason='wait' required>limit=True limit=60.0
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  invalid delay = PollSnapshot(state='done', terminal=True, status=200, data=Job:j1)
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j2?verbose=true
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  undeclared delay header = PollSnapshot(state='done', terminal=True, status=200, data=Job:j2)
intervals and deadlines
  interval past the session ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='poll_options.interval') [field_path=('poll_options', 'interval')] invalid_value
  interval past the session without a wait limit ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='poll_options.interval') [field_path=('poll_options', 'interval')] invalid_value
  interval past the wait limit ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='poll_options.interval') [field_path=('poll_options', 'interval')] invalid_value
  interval past the session deadline ! ConfigurationError: ConfigurationError(reason='invalid_value', field_path='poll_options.interval') [field_path=('poll_options', 'interval')] invalid_value
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  server delay past the session ! SessionLimitError reason='deadline' required>=limit=True
  > POST https://api.example.com/jobs?lang=en
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-client: tests, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1?lang=en
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued, x-client: tests] b''
  session without a deadline, with other patches = PollSnapshot(state='done', terminal=True, status=200, data=Job:j1)
session limits
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  first poll = PollSnapshot(state='queued', terminal=False, status=200, data=Job:j1)
  poll past the limit ! SessionLimitError: SessionLimitError(reason='polls', limit=1) [limit=1] polls
  wait past the limit ! SessionLimitError: SessionLimitError(reason='polls', limit=1) [limit=1] polls
failures that settle nothing
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  poll that fails to connect ! APIConnectionError: APIConnectionError(operation_id='getJob', cause='ConnectError') [operation_id='getJob', cause=ConnectError('failed')]
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  poll again = PollSnapshot(state='done', terminal=True, status=200, data=Job:j1)
  > GET https://api.example.com/jobs/j1/report
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  failed fetch ! InternalServerError: Error code: 500 - {} [operation_id='getReport', status_code=500, body=b'{}', body_bytes=b'{}', truncated=False]
  > GET https://api.example.com/jobs/j1/report
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  fetch again = Report(rows=2)
  progress {'polls': 2}
server delay of a failed result fetch
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1/report
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  fetch answered with a server delay ! InternalServerError: Error code: 503 - {"message":"busy"} [operation_id='getReport', status_code=503, body=b'{"message":"busy"}', body_bytes=b'{"message":"busy"}', truncated=False]
  fetch before the delay ! SessionLimitError reason='wait' required>limit=True limit=10
server delay of a failed poll
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  poll answered with a server delay ! InternalServerError: Error code: 503 - {"message":"busy"} [operation_id='getJob', status_code=503, body=b'{"message":"busy"}', body_bytes=b'{"message":"busy"}', truncated=False]
  poll before the delay ! SessionLimitError reason='wait' required>limit=True limit=10
  progress {'polls': 1}
waits and limits on the client clock
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  server delay less the clock's move ! SessionLimitError reason='wait' required_wait=90.0 limit=60.0
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  date delay on the client's wall clock ! SessionLimitError reason='wait' required_wait=120.0 limit=60.0
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  poll once the clock passes the delay = PollSnapshot(state='queued', terminal=False, status=200, data=Job:j1)
  delay past the session ! SessionLimitError reason='deadline' required_wait=30.0 limit=29.0
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  interval on a frozen clock = PollSnapshot(state='done', terminal=True, status=200, data=Job:j1)
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  async poll once the clock passes the delay = PollSnapshot(state='queued', terminal=False, status=200, data=Job:j1)
  async delay past the session ! SessionLimitError reason='deadline' required_wait=30.0 limit=29.0
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  async interval on a frozen clock = PollSnapshot(state='done', terminal=True, status=200, data=Job:j1)
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  async interval without a deadline on a frozen clock = PollSnapshot(state='done', terminal=True, status=200, data=Job:j1)
waits through the client clock's sleep
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1/report
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  wait = Report(rows=1)
  waits [5.0, 5.0, 12.0]
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1/report
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  async wait = Report(rows=1)
  async waits [5.0, 5.0, 12.0]
async lifecycle
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  status = PollSnapshot(state='running', terminal=False, status=200, data=Job:j1)
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: running] b''
  > GET https://api.example.com/jobs/j1/report
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  wait = Report(rows=3)
  status after success = PollSnapshot(state='done', terminal=True, status=200, data=Job:j1)
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1/report
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  wait through a short interval = Report(rows=5)
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  immediate wait = Report(rows=1)
  wait after the block ! ConfigurationError: ConfigurationError(reason='invalid_state', field_path='wait.closed') [field_path=('wait', 'closed')] invalid_state
async concurrent steps
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  status while waiting ! ConfigurationError: ConfigurationError(reason='invalid_state', field_path='status.polling') [field_path=('status', 'polling')] invalid_state
  close while waiting ! ConfigurationError: ConfigurationError(reason='invalid_state', field_path='aclose.polling') [field_path=('aclose', 'polling')] invalid_state
  wait cancelled
  progress {'polls': 0}
  close = None
  status after close ! ConfigurationError: ConfigurationError(reason='invalid_state', field_path='status.closed') [field_path=('status', 'closed')] invalid_state
async block error while another step runs
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  block error kept: LookupError('block')
  wait cancelled
  progress {'polls': 0}
  close the handle the block left open = None
  status after its close ! ConfigurationError: ConfigurationError(reason='invalid_state', field_path='status.closed') [field_path=('status', 'closed')] invalid_state
async server delay of a failed result fetch
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  > GET https://api.example.com/jobs/j1/report
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json] b''
  fetch answered with a server delay ! InternalServerError: Error code: 503 - {"message":"busy"} [operation_id='getReport', status_code=503, body=b'{"message":"busy"}', body_bytes=b'{"message":"busy"}', truncated=False]
  fetch before the delay ! SessionLimitError reason='wait' required>limit=True limit=10
async server delay of a failed poll
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  > GET https://api.example.com/jobs/j1
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, x-trace: queued] b''
  poll answered with a server delay ! InternalServerError: Error code: 503 - {"message":"busy"} [operation_id='getJob', status_code=503, body=b'{"message":"busy"}', body_bytes=b'{"message":"busy"}', truncated=False]
  poll before the delay ! SessionLimitError reason='wait' required>limit=True limit=10
async client closing during a wait
  > POST https://api.example.com/jobs
    [host: api.example.com, accept-encoding: gzip, deflate, accept: application/json, content-type: application/json, content-length: 18] b'{"name":"nightly"}'
  wait done after the client closed: False
  wait cancelled
  status after the client closed ! ConfigurationError: ConfigurationError(operation_id='getJob', reason='client_closed', field_path='client.closed') [operation_id='getJob', field_path=('client', 'closed')] client_closed
  progress {'polls': 0}
