Skip to content

async test + Apartment(ApartmentState.STA) => await not returning on STA thread #1200

Closed
@yar-shukan

Description

@yar-shukan

There is the old post on SO:
http://stackoverflow.com/questions/18838116/nunit-async-test-requiressta-await-not-returning-on-sta-thread
It seems like this issue has been there long time ago, but we faced it only after upgrading to NUnit 3.0.1.

We have tests that use async/await with Apartment(ApartmentState.STA) and before the upgrade to NUnit 3.0.1 they used to work, but after the upgrade they fail because WPF components don't run on STA thread after await statement.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions