Skip to content

Commit 2548818

Browse files
fixing tests
1 parent 2fc2e1b commit 2548818

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/RustAnalyzer.TestAdapter.UnitTests/Common/ProcessExtensionTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ namespace KS.RustAnalyzer.TestAdapter.UnitTests.Common;
1010

1111
public sealed class ProcessExtensionTests
1212
{
13-
private const int TimeoutSeconds = 30;
13+
private const int TimeoutSeconds = 15;
1414

1515
[Fact]
1616
public void CanFindAliveParentProcessId()
1717
{
18-
var p1 = Process.Start(("cmd", $"/c timeout {TimeoutSeconds} /NOBREAK").PSI());
18+
var p1 = Process.Start(("cmd", $"/k timeout {TimeoutSeconds} /NOBREAK").PSI());
1919

2020
var ppids = "timEOut".GetProcessesByName().Select(p => p.GetParentProcessId());
2121
p1.HasExited.Should().BeFalse();
@@ -42,7 +42,7 @@ public async Task CanFindDeadParentProcessIdAsync()
4242
[Fact]
4343
public void TestProcessOwnerUser()
4444
{
45-
var p1 = Process.Start(("cmd", $"/c timeout.exe {TimeoutSeconds} /NOBREAK").PSI());
45+
var p1 = Process.Start(("cmd", $"/k timeout.exe {TimeoutSeconds} /NOBREAK").PSI());
4646

4747
p1.GetProcessOwnerUser()
4848
.Should().Be(Process.GetCurrentProcess().GetProcessOwnerUser());

0 commit comments

Comments
 (0)