From 65e09f1cc69a571858a893dd82188b3d8133fee5 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Tue, 5 Sep 2017 13:49:34 -0700 Subject: [PATCH] Relax timeouts (#103) --- .../WebAppExtensions.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/Microsoft.AspNetCore.AzureAppServices.FunctionalTests/WebAppExtensions.cs b/test/Microsoft.AspNetCore.AzureAppServices.FunctionalTests/WebAppExtensions.cs index 87927f15a0..e5d5cbcdae 100644 --- a/test/Microsoft.AspNetCore.AzureAppServices.FunctionalTests/WebAppExtensions.cs +++ b/test/Microsoft.AspNetCore.AzureAppServices.FunctionalTests/WebAppExtensions.cs @@ -17,11 +17,14 @@ namespace Microsoft.AspNetCore.AzureAppServices.FunctionalTests { internal static class WebAppExtensions { + private static readonly TimeSpan GitDeployDelay = TimeSpan.FromSeconds(15); + private static readonly TimeSpan HttpClientTimeout = TimeSpan.FromMinutes(3); + public static HttpClient CreateClient(this IWebApp site) { var domain = site.GetHostNameBindings().First().Key; - return new HttpClient { BaseAddress = new Uri("http://" + domain) }; + return new HttpClient { BaseAddress = new Uri("http://" + domain), Timeout = HttpClientTimeout }; } public static async Task UploadFilesAsync(this IWebApp site, DirectoryInfo from, string to, IPublishingProfile publishingProfile, ILogger logger) @@ -91,6 +94,9 @@ namespace Microsoft.AspNetCore.AzureAppServices.FunctionalTests public static async Task GitDeploy(this IWebApp site, DirectoryInfo workingDirectory, ILogger logger) { + // Allow site to restart after site extension installation + await Task.Delay(GitDeployDelay); + var git = new TestCommand("git") { Logger = logger,