Skip to content

Commit e48e68a

Browse files
committed
Swallow exceptions instead of failing the test during cleanup
1 parent 6e6bd2d commit e48e68a

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/Shared/E2ETesting/BrowserFixture.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,20 @@ public static bool IsHostAutomationSupported()
6565

6666
public async Task DisposeAsync()
6767
{
68-
var browsers = _browsers.Values;
69-
foreach (var (browser, _) in browsers)
68+
try
7069
{
71-
browser?.Quit();
72-
browser?.Dispose();
73-
}
70+
var browsers = _browsers.Values;
71+
foreach (var (browser, _) in browsers)
72+
{
73+
browser?.Quit();
74+
browser?.Dispose();
75+
}
7476

75-
await DeleteBrowserUserProfileDirectoriesAsync();
77+
await DeleteBrowserUserProfileDirectoriesAsync();
78+
}
79+
catch
80+
{
81+
}
7682
}
7783

7884
private async Task DeleteBrowserUserProfileDirectoriesAsync()

0 commit comments

Comments
 (0)