Skip to content

Commit d624400

Browse files
authored
Add an additional timeout handler for mac-errors (#7880)
* flatten down the timeout handling
1 parent 50754b5 commit d624400

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

tools/test-proxy/Azure.Sdk.Tools.TestProxy/Store/GitProcessHandler.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,21 +232,17 @@ public bool IsRetriableGitError(CommandResult result)
232232
return true;
233233
}
234234

235-
// fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443: Connection timed out
236-
if (result.StdErr.Contains("Failed to connect to github.com port 443: Connection timed out"))
235+
// 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
236+
var regex = new Regex(@"Failed to connect to github.com port 443 after [\d]+ ms: Couldn't connect to server");
237+
if (regex.IsMatch(result.StdErr))
237238
{
238239
return true;
239240
}
240241

241242
// fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443: Operation timed out
242-
if (result.StdErr.Contains("Failed to connect to github.com port 443: Operation timed out"))
243-
{
244-
return true;
245-
}
246-
247-
// 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
248-
var regex = new Regex(@"Failed to connect to github.com port 443 after [\d]+ ms: Couldn't connect to server");
249-
if (regex.IsMatch(result.StdErr))
243+
// fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Failed to connect to github.com port 443: Connection timed out
244+
// fatal: unable to access 'https://github.com/Azure/azure-sdk-assets/': Recv failure: Operation timed out
245+
if (result.StdErr.Contains("timed out"))
250246
{
251247
return true;
252248
}

0 commit comments

Comments
 (0)