diff --git a/test/IntegrationTests/DotNetCliTests.cs b/test/IntegrationTests/DotNetCliTests.cs index e5c8acb73a..3a5e2d26a5 100644 --- a/test/IntegrationTests/DotNetCliTests.cs +++ b/test/IntegrationTests/DotNetCliTests.cs @@ -79,6 +79,7 @@ private static void ChangeDefaultProgramToHttpClient() { const string ProgramContent = @" using var httpClient = new HttpClient(); +httpClient.Timeout = TimeSpan.FromSeconds(5); using var response = await httpClient.GetAsync(""http://example.com""); Console.WriteLine(response.StatusCode); "; diff --git a/test/test-applications/integrations/TestApplication.CustomSdk/Program.cs b/test/test-applications/integrations/TestApplication.CustomSdk/Program.cs index 04b8f52b9e..2788cdd2bb 100644 --- a/test/test-applications/integrations/TestApplication.CustomSdk/Program.cs +++ b/test/test-applications/integrations/TestApplication.CustomSdk/Program.cs @@ -85,6 +85,7 @@ public static async Task Main(string[] args) await PingRedis(args); using var client = new HttpClient(); + client.Timeout = TimeSpan.FromSeconds(5); await client.GetStringAsync("https://www.bing.com", cancellation.Token); } diff --git a/test/test-applications/nuget-packages/TestApplication.SelfContained/Program.cs b/test/test-applications/nuget-packages/TestApplication.SelfContained/Program.cs index 4b7012135c..c847920af7 100644 --- a/test/test-applications/nuget-packages/TestApplication.SelfContained/Program.cs +++ b/test/test-applications/nuget-packages/TestApplication.SelfContained/Program.cs @@ -15,5 +15,6 @@ // var httpClient = new HttpClient(); +httpClient.Timeout = TimeSpan.FromSeconds(5); var response = await httpClient.GetAsync("http://example.com"); Console.WriteLine(response.StatusCode);