Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Diagnostics.Tests.ProcessTests.GetProcessesByName_ProcessName_ReturnsExpected test failure #28874

Closed
ahsonkhan opened this issue Mar 5, 2019 · 7 comments

Comments

@ahsonkhan
Copy link
Contributor

Failed in this PR: dotnet/corefx#35776 (https://github.com/dotnet/corefx/pull/35776/checks?check_run_id=72655929) on Windows.81.Amd64.Open-x64-Debug:
https://mc.dot.net/#/user/dotnet-bot/pr~2Fdotnet~2Fcorefx~2Frefs~2Fpull~2F35776~2Fmerge/test~2Ffunctional~2Fcli~2F~2Fouterloop~2F/20190305.1/workItem/System.Diagnostics.Process.Tests/analysis/xunit/System.Diagnostics.Tests.ProcessTests~2FGetProcessesByName_ProcessName_ReturnsExpected

Unhandled Exception of Type Xunit.Sdk.NotEmptyException
Message :
Assert.NotEmpty() Failure
Stack Trace :
   at System.Diagnostics.Tests.ProcessTests.GetProcessesByName_ProcessName_ReturnsExpected() in D:\a\1\s\src\System.Diagnostics.Process\tests\ProcessTests.cs:line 1074

cc @tmds

@danmoseley
Copy link
Member

Interesting.

@tmds
Copy link
Member

tmds commented Mar 5, 2019

Windows.81.Amd64.Open-x64-Debug

Not my cup of tea.

@danmoseley
Copy link
Member

danmoseley commented Mar 6, 2019

Two possibilities

  1. Somehow currentProcess.ProcessName is null or empty, in this case GetProcessesByName would immediately return empty string causing this result. Suggest asserting that just above this line.
  2. Somehow list returned by GetProcesses does not include this process name. Might be worth this test dumping the list to console if it's failing.

@wfurt
Copy link
Member

wfurt commented Mar 20, 2019

It also failed on OSX and Linux machines. But it is failing only for PRs. There was no single failure in official builds.

System.AggregateException : One or more errors occurred. (TimeSpan overflowed because the duration is too long.) (TimeSpan overflowed because the duration is too long.)\n---- System.OverflowException : TimeSpan overflowed because the duration is too long.\n---- System.OverflowException : TimeSpan overflowed because the duration is too long.

----- Inner Stack Trace dotnet/corefx#1 (System.OverflowException) -----
   at System.TimeSpan.Add(TimeSpan ts) in /__w/2/s/src/System.Private.CoreLib/shared/System/TimeSpan.cs:line 165
   at System.TimeSpan.op_Addition(TimeSpan t1, TimeSpan t2) in /__w/2/s/src/System.Private.CoreLib/shared/System/TimeSpan.cs:line 489
----- Inner Stack Trace dotnet/corefx#2 (System.OverflowException) -----
   at System.TimeSpan.Add(TimeSpan ts) in /__w/2/s/src/System.Private.CoreLib/shared/System/TimeSpan.cs:line 165
   at ReflectionAbstractionExtensions.DisposeTestClass(ITest test, Object testClass, IMessageBus messageBus, ExecutionTimer timer, CancellationTokenSource cancellationTokenSource) in C:\projects\xunit\src\xunit.execution\Extensions\ReflectionAbstractionExtensions.cs:line 79

@danmoseley
Copy link
Member

resovled by dotnet/corefx#37294 ?

@MarcoRossignoli
Copy link
Member

Mmm error was on Win...btw no more happened...

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the 3.0 milestone Feb 1, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants