Skip to content

Commit 0759d9d

Browse files
committed
Revert "Skip flaky test on Linux" and use timeout instead
This reverts commit 49500fa. Something weird is going on with the Ubuntu CI where some of these tests hang, needs more investigation.
1 parent 402ab4f commit 0759d9d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs

+5-4
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ private Task ExecutePowerShellCommand(string command, params string[] args)
103103

104104
private void AssertDebuggerPaused()
105105
{
106-
DebuggerStoppedEventArgs eventArgs = debuggerStoppedQueue.Take(CancellationToken.None);
106+
using CancellationTokenSource cts = new(10000);
107+
DebuggerStoppedEventArgs eventArgs = debuggerStoppedQueue.Take(cts.Token);
107108
Assert.Empty(eventArgs.OriginalEvent.Breakpoints);
108109
}
109110

@@ -112,7 +113,8 @@ private void AssertDebuggerStopped(
112113
int lineNumber = -1,
113114
CommandBreakpointDetails commandBreakpointDetails = default)
114115
{
115-
DebuggerStoppedEventArgs eventArgs = debuggerStoppedQueue.Take(CancellationToken.None);
116+
using CancellationTokenSource cts = new(10000);
117+
DebuggerStoppedEventArgs eventArgs = debuggerStoppedQueue.Take(cts.Token);
116118

117119
Assert.True(psesHost.DebugContext.IsStopped);
118120

@@ -587,10 +589,9 @@ await debugService.SetLineBreakpointsAsync(
587589
Assert.Equal("$false", falseVar.ValueString);
588590
}
589591

590-
[SkippableFact]
592+
[Fact]
591593
public async Task DebuggerSetsVariablesNoConversion()
592594
{
593-
Skip.If(VersionUtils.IsLinux, "Test hangs on Linux for some reason");
594595
await debugService.SetLineBreakpointsAsync(
595596
variableScriptFile,
596597
new[] { BreakpointDetails.Create(variableScriptFile.FilePath, 14) }).ConfigureAwait(true);

0 commit comments

Comments
 (0)