From d3807c4bf214a4f5309b61ed5cf864d0e027f474 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 12 Jul 2023 09:45:06 -0700 Subject: [PATCH] Increase timeout to make subsystem tests more reliable (#19937) Co-authored-by: Dongbo Wang --- test/xUnit/csharp/test_Prediction.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/xUnit/csharp/test_Prediction.cs b/test/xUnit/csharp/test_Prediction.cs index a2c38db135..e69f5b21a9 100644 --- a/test/xUnit/csharp/test_Prediction.cs +++ b/test/xUnit/csharp/test_Prediction.cs @@ -147,7 +147,7 @@ namespace PSTests.Sequential // cannot finish before the specified timeout. // The specified timeout is exaggerated to make the test reliable. // xUnit must spin up a lot tasks, which makes the test unreliable when the time difference between 'delay' and 'timeout' is small. - results = CommandPrediction.PredictInputAsync(predClient, ast, tokens, millisecondsTimeout: 1000).Result; + results = CommandPrediction.PredictInputAsync(predClient, ast, tokens, millisecondsTimeout: 1500).Result; Assert.Single(results); PredictionResult res = results[0]; @@ -214,7 +214,7 @@ namespace PSTests.Sequential slow.DisplayedSuggestions.Count == 0 || fast.DisplayedSuggestions.Count == 0 || slow.AcceptedSuggestions.Count == 0) { - Thread.Sleep(100); + Thread.Sleep(300); } Assert.Equal(2, slow.History.Count);