Browse Source

Reduce timeout and fix broken test

dev/ps/tryUpdateVersion
Pratik Sanglikar 5 years ago
parent
commit
227906b7b8
  1. 2
      src/Microsoft.Tye.Core/ProcessUtil.cs
  2. 2
      test/E2ETest/ReplicaStoppingTests.cs

2
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<int> ExecuteAsync(
string command,

2
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;

Loading…
Cancel
Save