From ae17267467e8bd829a444618c6d0a1a1446080bc Mon Sep 17 00:00:00 2001 From: Bjoern Gdanietz <609797+Brimerland@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:45:28 +0100 Subject: [PATCH] the GC.Collect and GC.WaitForPendingFinalizers is also called by the PlaywrightTest attribute --- src/Playwright.Tests/BrowserContextRouteTests.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Playwright.Tests/BrowserContextRouteTests.cs b/src/Playwright.Tests/BrowserContextRouteTests.cs index bb7f4fb590..31f73320ad 100644 --- a/src/Playwright.Tests/BrowserContextRouteTests.cs +++ b/src/Playwright.Tests/BrowserContextRouteTests.cs @@ -212,11 +212,6 @@ await route.FulfillAsync(new() // let the test run for 5 second await Task.Delay(5000); - // trigger garbage collection which checks for unorbserved exceptions - // in collected tasks - GC.Collect(); - GC.WaitForPendingFinalizers(); - // unobserved task exceptions are automatically collected by the PlaywrightTest attribute }