We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ca726d commit d96c42eCopy full SHA for d96c42e
src/bunit.core/TestContextBase.cs
@@ -91,10 +91,13 @@ protected virtual void Dispose(bool disposing)
91
renderer.Dispose();
92
}
93
94
+ // Ignore the async task as GetAwaiter().GetResult() can cause deadlock
95
+ // and implementing IAsyncDisposable in TestContext will be a breaking change.
96
+ //
97
// NOTE: This has to be called before Services.Dispose().
98
// If there are IAsyncDisposable services registered, calling Dispose first
99
// causes the service provider to throw an exception.
- Services.DisposeAsync().GetAwaiter().GetResult();
100
+ _ = Services.DisposeAsync();
101
102
// The service provider should dispose of any
103
// disposable object it has created, when it is disposed.
0 commit comments