From d6244003e06588dae22f8c0795f50daec57e1e03 Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Thu, 14 Mar 2024 18:33:53 -0700 Subject: [PATCH] Add an additional timeout handler for mac-errors (#7880) * flatten down the timeout handling --- .../Store/GitProcessHandler.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Store/GitProcessHandler.cs b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Store/GitProcessHandler.cs index fd4581b0d..561aff602 100644 --- a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Store/GitProcessHandler.cs +++ b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Store/GitProcessHandler.cs @@ -232,21 +232,17 @@ namespace Azure.Sdk.Tools.TestProxy.Store return true; } - // fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443: Connection timed out - if (result.StdErr.Contains("Failed to connect to github.com port 443: Connection timed out")) + // fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443 after 21019 ms: Couldn't connect to server + var regex = new Regex(@"Failed to connect to github.com port 443 after [\d]+ ms: Couldn't connect to server"); + if (regex.IsMatch(result.StdErr)) { return true; } // fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443: Operation timed out - if (result.StdErr.Contains("Failed to connect to github.com port 443: Operation timed out")) - { - return true; - } - - // fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443 after 21019 ms: Couldn't connect to server - var regex = new Regex(@"Failed to connect to github.com port 443 after [\d]+ ms: Couldn't connect to server"); - if (regex.IsMatch(result.StdErr)) + // fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443: Connection timed out + // fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Recv failure: Operation timed out + if (result.StdErr.Contains("timed out")) { return true; }