Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up test_pipe_protocol test #2286

Merged
merged 1 commit into from
Aug 20, 2023
Merged

Conversation

phw
Copy link
Member

@phw phw commented Aug 20, 2023

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

The test_pipe_protocol is extremely slow. Without it the full test suite runs on my system with pytest in ~8 seconds. With test_pipe_protocol enabled in runs 71 seconds.

Solution

  • Only test a single message. As there is no message processing here we just need to ensure the sent message gets read
  • Reduce timeouts. The timeouts helped with Windows tests. But try to reduce them.
  • The check for if message in pipe_listener might help with macOS tests. On macOS sometimes the read seems to return an empty string. In normal use in Picard that is ok. The empty string is not a processed message and the loop will just read the next one. Do the same in tests

Only test a single message, reduce timeouts.
@phw phw requested a review from zas August 20, 2023 06:40
@phw phw merged commit 67dc990 into metabrainz:master Aug 20, 2023
63 checks passed
@phw phw deleted the reduce-pipe-tests branch August 20, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants