add tests & fix weird behaviour#31
Closed
MayNiklas wants to merge 6 commits into
Closed
Conversation
…lity test - Use find_free_port() and Path(__file__) for reliable test execution - Add setUpClass server readiness check and graceful tearDownClass cleanup - Add tests for version, invalid task_id, non-audio upload, translate - Add stability test that runs all iterations and reports aggregate failures - Skip all tests by default (require whisper model to run)
…sends - log_setup: use select() in PipedFileHandler.emit() to avoid blocking when the logging pipe buffer is full in child processes, preventing the listener thread from freezing and cascading into a full pipe deadlock - decoder: add pipe_send_lock to serialize concurrent pipe_to_parent.send() calls between the run() and decode_loop() threads - main: use os._exit(0) instead of sys.exit(0) to avoid SystemExit propagating through the asyncio event loop during signal-driven shutdown
Buffer log records into a queue.Queue in child processes and drain them to the pipe in a dedicated daemon thread, so emit() never blocks the caller and no log records are lost when the pipe buffer is full.
Collaborator
|
i see what was changed, but why does having an extra thread that moves messages from queue to pipe resolve a deadlock? |
Merged
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.
This PR should be merged into #28 .
Adds unit tests for the transcription itself.
We hade some weird issues with our pipes after #25:
To investigate the issue, I created a unit test for the scenario.
After a lot of headaches, AI was able to create a fix.
-> we now handle pipes safer