-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed dispose of chrome processes
- Loading branch information
Showing
9 changed files
with
113 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "nuget" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
ignore: | ||
- dependency-name: "nunit" | ||
- dependency-name: "SonarAnalyzer.CSharp" | ||
- dependency-name: "AngleSharp" | ||
- dependency-name: "Microsoft.NET.Test.Sdk" | ||
- dependency-name: "Microsoft.AspNetCore.Mvc.Testing" | ||
- dependency-name: "Moq" | ||
- dependency-name: "xunit" | ||
- dependency-name: "xunit.runner.visualstudio" | ||
- dependency-name: "MSTest.TestAdapter" | ||
- dependency-name: "ImageSharpCompare" | ||
- dependency-name: "PdfjsSharp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
PuppeteerSharp.RendererTests/Infrastrukture/ChromiumProcessDisposedAsserter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
|
||
namespace PuppeteerSharp.RendererTests.Infrastrukture | ||
{ | ||
public static class ChromiumProcessDisposedAsserter | ||
{ | ||
public static async Task AssertNoChromeProcessIsRunning() | ||
{ | ||
for (var i = 0; i < 20 && CountChromiumTasks() > 0; i++) | ||
{ | ||
await Task.Delay(200); | ||
} | ||
Assert.Equal(0, CountChromiumTasks()); | ||
} | ||
|
||
public static int CountChromiumTasks() | ||
{ | ||
var processes = Process.GetProcesses().Where(process => process.ProcessName.Contains("chrome")).ToList(); | ||
return processes.Count; | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters