How can I avoid running some tests in parallel?

Juan Leni

I have a collection of tests. There are a few tests that need to access a shared resource (external library/API/hardware device). If any of these tests run in parallel, they fail.

I know I could run everything using --test-threads=1 but I find that inconvenient just for a couple of special tests.

Is there any way to keep running all tests in parallel and have an exception for a few? Ideally, I would like to say do not run X, Y, Z at the same time.

D G

Use the serial_test crate. With this crate added, you put in your code:

#[serial]

in front of any test you want run in sequentially.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How can I avoid Phusion Passenger running as root?

分類Dev

How can I avoid my program to keep running when I close my main frame?

分類Dev

How can I get gulp to be silent for some tasks (unit tests,vet etc)?

分類Dev

Go - how can i detect if the users PC is running some prerequisite tools such as Google Chrome for example

分類Dev

Running junit parameterized tests (not classes) in parallel

分類Dev

TestNG Based Selenium Tests not running in Parallel

分類Dev

How can I parallel biginteger using openmp?

分類Dev

How can I parallel parsing in python?

分類Dev

How can I avoid "environment hell" in postman?

分類Dev

How can I avoid losing precision with ftFmtBcd?

分類Dev

How can I avoid a circular reference situation

分類Dev

Django conditional queries: How can I avoid this?

分類Dev

How can I avoid duplicate templates in Meteor?

分類Dev

How i can avoid the distinct() of watchdog?

分類Dev

How can I avoid problems with CPU power?

分類Dev

how can I debug go tests with gdb

分類Dev

How I can make a column with some indicator?

分類Dev

How can I test a MessageBodyWriter for a List<Some>?

分類Dev

How can I know whether a JobScheduler is running?

分類Dev

How can I see what processes are running?

分類Dev

how to avoid some function in the legend?

分類Dev

How can I use foreach function for parallel coding?

分類Dev

How can I avoid nested Navigation Bars in SwiftUI?

分類Dev

How can I avoid using 'at' in radial-gradient?

分類Dev

How can i avoid Jquery translate `?` to `%3F`

分類Dev

How can I avoid overwriting dynamodb from two lambdas?

分類Dev

EXC_BAD_ACCESS - How can I avoid it?

分類Dev

How can i avoid or pass over a directory that is access denied?

分類Dev

How can I avoid repeating the css and not using !important?

Related 関連記事

  1. 1

    How can I avoid Phusion Passenger running as root?

  2. 2

    How can I avoid my program to keep running when I close my main frame?

  3. 3

    How can I get gulp to be silent for some tasks (unit tests,vet etc)?

  4. 4

    Go - how can i detect if the users PC is running some prerequisite tools such as Google Chrome for example

  5. 5

    Running junit parameterized tests (not classes) in parallel

  6. 6

    TestNG Based Selenium Tests not running in Parallel

  7. 7

    How can I parallel biginteger using openmp?

  8. 8

    How can I parallel parsing in python?

  9. 9

    How can I avoid "environment hell" in postman?

  10. 10

    How can I avoid losing precision with ftFmtBcd?

  11. 11

    How can I avoid a circular reference situation

  12. 12

    Django conditional queries: How can I avoid this?

  13. 13

    How can I avoid duplicate templates in Meteor?

  14. 14

    How i can avoid the distinct() of watchdog?

  15. 15

    How can I avoid problems with CPU power?

  16. 16

    how can I debug go tests with gdb

  17. 17

    How I can make a column with some indicator?

  18. 18

    How can I test a MessageBodyWriter for a List<Some>?

  19. 19

    How can I know whether a JobScheduler is running?

  20. 20

    How can I see what processes are running?

  21. 21

    how to avoid some function in the legend?

  22. 22

    How can I use foreach function for parallel coding?

  23. 23

    How can I avoid nested Navigation Bars in SwiftUI?

  24. 24

    How can I avoid using 'at' in radial-gradient?

  25. 25

    How can i avoid Jquery translate `?` to `%3F`

  26. 26

    How can I avoid overwriting dynamodb from two lambdas?

  27. 27

    EXC_BAD_ACCESS - How can I avoid it?

  28. 28

    How can i avoid or pass over a directory that is access denied?

  29. 29

    How can I avoid repeating the css and not using !important?

ホットタグ

アーカイブ