Skip to content

Expand documentation discussion about .serialized and global actors #1151

Open
@briancroom

Description

@briancroom

Description

We have a docs article Running tests serially or in parallel with some discussion about concurrent test execution and the .serialized trait. It would be lovely to see this expanded a little bit to also touch on things like:

  • What can cause some tests to interfere with each other when they run concurrently (e.g. tests requiring exclusive access to shared global state, which can lead to problems even when using strict concurrency checking so that there are no formal data races)
  • How isolating tests to a global actor (or calling out to code isolated to a global actor) can be used to help address this in some cases, without requiring .serialized
  • Highlighting the way that tests interfering with each other in this way can provide an indication that non-test clients could also encounter similar problems, potentially suggesting that the API could be improved to help guard against the interference.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    concurrency🔀 Swift concurrency/sendability issuesdocumentation📚 Improvements or additions to documentationenhancementNew feature or requesttriagedThis issue has undergone initial triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions