Skip to content

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

@matthew-healy

Description

@matthew-healy

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions