Skip to content

Commit 4936a56

Browse files
authored
Increase timeout to make subsystem tests more reliable (PowerShell#18380)
1 parent f3f56d4 commit 4936a56

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/xUnit/csharp/test_Feedback.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static void GetFeedback()
8989
// Expect the result from 'General' only because the 'slow' one cannot finish before the specified timeout.
9090
// The specified timeout is exaggerated to make the test reliable.
9191
// xUnit must spin up a lot tasks, which makes the test unreliable when the time difference between 'delay' and 'timeout' is small.
92-
var feedbacks = FeedbackHub.GetFeedback(pwsh.Runspace, millisecondsTimeout: 1000);
92+
var feedbacks = FeedbackHub.GetFeedback(pwsh.Runspace, millisecondsTimeout: 1500);
9393
string expectedCmd = Path.Combine(".", "feedbacktest");
9494

9595
// Test the result from the 'General' feedback provider.

test/xUnit/csharp/test_Prediction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public static void PredictInput()
147147
// cannot finish before the specified timeout.
148148
// The specified timeout is exaggerated to make the test reliable.
149149
// xUnit must spin up a lot tasks, which makes the test unreliable when the time difference between 'delay' and 'timeout' is small.
150-
results = CommandPrediction.PredictInputAsync(predClient, ast, tokens, millisecondsTimeout: 1000).Result;
150+
results = CommandPrediction.PredictInputAsync(predClient, ast, tokens, millisecondsTimeout: 1500).Result;
151151
Assert.Single(results);
152152

153153
PredictionResult res = results[0];
@@ -214,7 +214,7 @@ public static void Feedback()
214214
slow.DisplayedSuggestions.Count == 0 || fast.DisplayedSuggestions.Count == 0 ||
215215
slow.AcceptedSuggestions.Count == 0)
216216
{
217-
Thread.Sleep(100);
217+
Thread.Sleep(300);
218218
}
219219

220220
Assert.Equal(2, slow.History.Count);

0 commit comments

Comments
 (0)