Skip to content

Commit d88da36

Browse files
committed
Fix await on null when test class don't have any tests
1 parent 3565948 commit d88da36

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Components/test/E2ETest/Infrastructure/ServerFixtures/WebHostServerFixture.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ private async ValueTask DisposeCore()
3939
// This can be null if creating the webhost throws, we don't want to throw here and hide
4040
// the original exception.
4141
Host?.Dispose();
42-
await Host?.StopAsync();
42+
43+
if (Host != null)
44+
{
45+
await Host.StopAsync();
46+
}
4347
}
4448
}

0 commit comments

Comments
 (0)