Skip to content

C# unit test TestAppDomainProcessExitEvenHandlerNotLeaking is flaky #10813

@mdalepiane

Description

@mdalepiane

Steps to reproduce

  • The unit test TestAppDomainProcessExitEvenHandlerNotLeaking is flaky.
  • Currently is the top 1 faling test in the last 30 days. Failed 20 times out of 87 runs (23% failure rate).
  • And all failures have the same error message and stack trace.
  • Seems to have been introduced 10/10 in Add test for the even handler leaking fix #10768.

Error Message

Assert.DoesNotContain() Failure
Found: (filter expression)
In value: Delegate[] [EventHandler { Method = Void DisposeOnShutdown(System.Object, System.EventArgs), Target = null }, EventHandler { Method = Void CurrentDomain_ProcessExit(System.Object, System.EventArgs), Target = null }]

Stack Trace

at PSTests.Sequential.RunspaceTests.TestAppDomainProcessExitEvenHandlerNotLeaking() in D:\a\1\s\test\xUnit\csharp\test_Runspace.cs:line 127

PowerShell-CI-windows - Test failure report
image

Expected behavior

Test results should be consistent.

Actual behavior

Test is flaky.

Environment data

Unit tests must be executed in a windows platform.

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreWG-Quality-Testissues in a test or in test infrastructure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions