You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using v3.7.0/v3.7.1 from nuget.
Run with NUnit3TestAdapter, NUnit-Gui-0.3, and nunit3-console.
I have some TestFixtures that implement IDisposable. Prior to the v3.7.0 release these test fixtures always executed the OneTimeTearDown (and TestFixtureTearDown before that) method before the TestFixture class' Dispose method. After performing a NuGet update to NUnit v3.7.0 and NUnit v3.7.1 these tests started throwing exceptions in the OneTimeTearDown method as some members had been disposed already.
I was able to reproduce this behavior with the cs-money sample project by having MoneyTest implement IDisposable, add a OneTimeTearDown method, and set breakpoints in each method. NuGet NUnit version before 3.7 execute the OneTimeTearDown method first, 3.7 and 3.7.1 execute Dispose first.
Should I be assuming an ordering of these methods?
The text was updated successfully, but these errors were encountered:
I have confirmed this error by inspecting the code. The commands that make up a test setup are executed in reverse order, whereas one time setup commands are independent and are executed in the order specified in the command list. I updated the list of commands for fixture one-time teardown incorrectly.
I'm assigning this to myself, since I caused it. Too bad we didn't here about this before the hotfix.
@rprouse I'm making this high priority rather than critical. I think only you should decide what's critical and therefore requires a hotfix.
Uh oh!
There was an error while loading. Please reload this page.
Using v3.7.0/v3.7.1 from nuget.
Run with NUnit3TestAdapter, NUnit-Gui-0.3, and nunit3-console.
I have some TestFixtures that implement IDisposable. Prior to the v3.7.0 release these test fixtures always executed the OneTimeTearDown (and TestFixtureTearDown before that) method before the TestFixture class' Dispose method. After performing a NuGet update to NUnit v3.7.0 and NUnit v3.7.1 these tests started throwing exceptions in the OneTimeTearDown method as some members had been disposed already.
I was able to reproduce this behavior with the cs-money sample project by having MoneyTest implement IDisposable, add a OneTimeTearDown method, and set breakpoints in each method. NuGet NUnit version before 3.7 execute the OneTimeTearDown method first, 3.7 and 3.7.1 execute Dispose first.
Should I be assuming an ordering of these methods?
The text was updated successfully, but these errors were encountered: