From 227906b7b88c1025824b9845e6d536ff8655cf1a Mon Sep 17 00:00:00 2001 From: Pratik Sanglikar Date: Tue, 27 Jul 2021 09:36:57 -0700 Subject: [PATCH] Reduce timeout and fix broken test --- src/Microsoft.Tye.Core/ProcessUtil.cs | 2 +- test/E2ETest/ReplicaStoppingTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Tye.Core/ProcessUtil.cs b/src/Microsoft.Tye.Core/ProcessUtil.cs index 01270a45..d0c8ad1b 100644 --- a/src/Microsoft.Tye.Core/ProcessUtil.cs +++ b/src/Microsoft.Tye.Core/ProcessUtil.cs @@ -23,7 +23,7 @@ namespace Microsoft.Tye private static readonly bool IsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); - private const int ProcessExitTimeoutMs = 60 * 1000; // 1 minute timeout for the process to exit. + private const int ProcessExitTimeoutMs = 30 * 1000; // 30 seconds timeout for the process to exit. public static Task ExecuteAsync( string command, diff --git a/test/E2ETest/ReplicaStoppingTests.cs b/test/E2ETest/ReplicaStoppingTests.cs index 6ba8aa4e..91275181 100644 --- a/test/E2ETest/ReplicaStoppingTests.cs +++ b/test/E2ETest/ReplicaStoppingTests.cs @@ -61,7 +61,7 @@ namespace E2ETest var replicasToRestart = new[] { replicaToStop.Key }; var restOfReplicas = host.Application.Services.SelectMany(s => s.Value.Replicas).Select(r => r.Value.Name).Where(r => r != replicaToStop.Key).ToArray(); - Assert.True(await DoOperationAndWaitForReplicasToRestart(host, replicasToRestart.ToHashSet(), restOfReplicas.ToHashSet(), TimeSpan.FromSeconds(1), _ => + Assert.True(await DoOperationAndWaitForReplicasToRestart(host, replicasToRestart.ToHashSet(), restOfReplicas.ToHashSet(), TimeSpan.FromSeconds(30), _ => { replicaToStop.Value.StoppingTokenSource!.Cancel(); return Task.CompletedTask;