Skip to content

Commit

Permalink
chore: Update streaming loop to include request eviction status
Browse files Browse the repository at this point in the history
  • Loading branch information
bhimrazy committed Aug 31, 2024
1 parent bac5534 commit f08ed4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_loops.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ def fake_encode(output):
requests_queue = Queue()
requests_queue.put((0, "UUID-1234", time.monotonic(), {"prompt": "Hello"}))
response_queues = [FakeStreamResponseQueue(num_streamed_outputs)]
request_evicted_status = {}

with pytest.raises(StopIteration, match="exit loop"):
run_streaming_loop(fake_stream_api, fake_stream_api, requests_queue, response_queues)
run_streaming_loop(fake_stream_api, fake_stream_api, requests_queue, response_queues, request_evicted_status)

fake_stream_api.predict.assert_called_once_with("Hello")
fake_stream_api.encode_response.assert_called_once()
Expand Down

0 comments on commit f08ed4b

Please sign in to comment.