Skip to content

Add flag to opt out one test from parallel testing #33519

Closed
@dns2utf8

Description

@dns2utf8

Hi all

I had a problem while testing the threadpool-crate because all test run in parallel and all of them use the whole cpu.
Would it be possible to add a additional flag for test like this? Maybe something like this:

#[test]
#[no_parallel]
fn test_heavy_load_on_cpu_or_gpu_or_global_state() {
  // working hard here ...
}

The implementation would have to queue these test and run them sequencally.

The flag no_parallel seems very expressiv, but I prefere a positive keyword like single, serial or individual or something like this.

What do you think?
Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-libtestArea: `#[test]` / the `test` library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions