Skip to content

SetUpFixture causes NUnit to lock with Apartment( STA ) #2534

Closed
@Rantanen

Description

@Rantanen

Reproduction:
https://github.com/Rantanen/intercom/tree/nunit-issue

Having both [assembly: Apartment( ApartmentState.STA )] and a type marked as [SetUpFixture] in a test project will cause the tests to lock up. Reproductible with both the NUnit console runner and R# test runner.

The Apartment attribute may be defined on either assembly level or type level with the same results.

> ..\..\..\packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe STATest.dll
NUnit Console Runner 3.7.0
Copyright (c) 2017 Charlie Poole, Rob Prouse

Runtime Environment
   OS Version: Microsoft Windows NT 10.0.15063.0
  CLR Version: 4.0.30319.42000

Test Files
    STATest.dll

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions