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

Use serial_test rather than --test-threads=1 #33

Open
matthew-healy opened this issue May 4, 2023 · 0 comments
Open

Use serial_test rather than --test-threads=1 #33

matthew-healy opened this issue May 4, 2023 · 0 comments

Comments

@matthew-healy
Copy link
Collaborator

Currently tests/pubsub_client only works if you remember to pass --test-threads=1. Forgetting to do this caused me some confusion earlier today, as I couldn't work out whether something I changed had broken the tests.

In the past, I've used the serial_test crate to ensure that only a single test is able to run at a time, without having to remember to pass the --test-threads argument. This has the added bonus of ensuring that only the tests which cannot be run in parallel are run serially, which should lead to faster test runs in general.

(This isn't hard to do, but I don't have time to do it right now, so I'm documenting it here.)

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

No branches or pull requests

1 participant