diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index 4ec4e13fc1d1..986f7c1810ff 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -69,7 +69,7 @@ public void TestBasePriorityOnWindows() try { - // We are not checking for RealTime case here, as RealTime priority process can + // We are not checking for RealTime case here, as RealTime priority process can // preempt the threads of all other processes, including operating system processes // performing important tasks, which may cause the machine to be unresponsive. @@ -280,7 +280,7 @@ public void StartTime_GetNotStarted_ThrowsInvalidOperationException() public void TestId() { CreateDefaultProcess(); - + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { Assert.Equal(_process.Id, Interop.GetProcessId(_process.SafeHandle)); @@ -339,7 +339,7 @@ public void Kill_NotStarted_ThrowsInvalidOperationException() public void TestMachineName() { CreateDefaultProcess(); - + // Checking that the MachineName returns some value. Assert.NotNull(_process.MachineName); } @@ -372,7 +372,7 @@ public void TestMainModule() public void TestMaxWorkingSet() { CreateDefaultProcess(); - + using (Process p = Process.GetCurrentProcess()) { Assert.True((long)p.MaxWorkingSet > 0); @@ -427,7 +427,7 @@ public void MaxValueWorkingSet_GetSetMacos_ThrowsPlatformSupportedException() public void TestMinWorkingSet() { CreateDefaultProcess(); - + using (Process p = Process.GetCurrentProcess()) { Assert.True((long)p.MaxWorkingSet > 0); @@ -499,7 +499,7 @@ public void TestModules() public void TestNonpagedSystemMemorySize64() { CreateDefaultProcess(); - + AssertNonZeroWindowsZeroUnix(_process.NonpagedSystemMemorySize64); } @@ -650,7 +650,7 @@ public void WorkingSet64_GetNotStarted_ThrowsInvalidOperationException() public void TestProcessorTime() { CreateDefaultProcess(); - + Assert.True(_process.UserProcessorTime.TotalSeconds >= 0); Assert.True(_process.PrivilegedProcessorTime.TotalSeconds >= 0); @@ -750,7 +750,7 @@ public void ExitTime_GetNotStarted_ThrowsInvalidOperationException() public void TestProcessorAffinity() { CreateDefaultProcess(); - + IntPtr curProcessorAffinity = _process.ProcessorAffinity; try { @@ -976,6 +976,7 @@ public void GetProcesses_RemoteMachinePath_ReturnsExpected() } [Fact] + [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/32780 [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")] public void GetProcessesByName_ProcessName_ReturnsExpected() { @@ -1025,7 +1026,7 @@ public void GetProcessesByName_RemoteMachineNameWindows_ReturnsExpected(string m } catch (InvalidOperationException) { - // As we can't detect reliably if performance counters are enabled + // As we can't detect reliably if performance counters are enabled // we let possible InvalidOperationExceptions pass silently. } } @@ -1078,13 +1079,13 @@ void TestRemoteProccess(Process remoteProcess) } catch (InvalidOperationException) { - // As we can't detect reliably if performance counters are enabled + // As we can't detect reliably if performance counters are enabled // we let possible InvalidOperationExceptions pass silently. } } [Fact] - [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] + [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] public void StartInfo_GetFileName_ReturnsExpected() { Process process = CreateProcessLong(); @@ -1097,9 +1098,9 @@ public void StartInfo_GetFileName_ReturnsExpected() process.Kill(); Assert.True(process.WaitForExit(WaitInMS)); } - + [Fact] - [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] + [ActiveIssue(31908, TargetFrameworkMonikers.Uap)] public void StartInfo_SetOnRunningProcess_ThrowsInvalidOperationException() { Process process = CreateProcessLong();