Skip to content

Support running single-threaded async tests on Linux #4110

@MCMrARM

Description

@MCMrARM

Currently the [Apartment(ApartmentState.STA)] annotation is not supported on Linux, which means that the SingleThreadedSynchronizationContext cannot be enabled on Linux and tests using the annotation are skipped with "Apartment state cannot be set on this platform.". There is as far as I can see no other way to enable the nunit's SingleThreadedSynchronizationContext. It also seems that MessagePumpStrategy only has hardcoded strategies for the default SynchronizationContextes and does not support a custom SynchronizationContext, making use of a custom single threaded SynchronizationContext impossible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions