Repository navigation
test: read through an empty log-tail stream when resuming - #312
Merged
Merged
Conversation
…rce does Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests/fastapi/test_log_tail_api.py::test_resume_after_id[loaded-loop]failed onmain(CI run 45296913127,test shard (ubuntu-latest, 3.12, 2/4)):assert [] == ['106f5a517989d97f-3'].The stream ends after
stream_max_seconds(0.05 s in these tests), and on a loaded runner it can end before its first frame. The_idshelper, which reads ids the wayEventSourcedoes, treated one empty stream as the end of the replay and stopped.EventSourcereconnects in that case._idsnow stops only after three consecutive streams bring no line (EMPTY_STREAMS). The production stream and the assertions are unchanged. A replay that is really complete costs two extra 0.05 s streams.Verification
ruff check,ruff format --check.pytest -n 4 tests/fastapi/test_log_tail_api.pyfive times in a row: 33 passed each time.Contribution Checklist
Signed-off-by.AGENTS.md.