Beispiel #1
0
        protected async Task WaitForActorRuntimeAsync(IPingActor proxy, CancellationToken cancellationToken)
        {
            while (true)
            {
                this.Output.WriteLine($"Waiting for actor to be ready in: {this.AppId}");
                cancellationToken.ThrowIfCancellationRequested();

                try
                {
                    await proxy.Ping();

                    this.Output.WriteLine($"Found actor in: {this.AppId}");
                    break;
                }
                catch (DaprApiException)
                {
                    await Task.Delay(TimeSpan.FromMilliseconds(250));
                }
            }
        }
Beispiel #2
0
        public static async Task WaitForActorRuntimeAsync(string appId, ITestOutputHelper output, IPingActor proxy, CancellationToken cancellationToken)
        {
            while (true)
            {
                output.WriteLine($"Waiting for actor to be ready in: {appId}");
                cancellationToken.ThrowIfCancellationRequested();

                try
                {
                    await proxy.Ping();

                    output.WriteLine($"Found actor in: {appId}");
                    break;
                }
                catch (DaprApiException)
                {
                    await Task.Delay(TimeSpan.FromMilliseconds(250));
                }
            }
        }
Beispiel #3
0
 protected async Task WaitForActorRuntimeAsync(IPingActor proxy, CancellationToken cancellationToken)
 {
     await ActorRuntimeChecker.WaitForActorRuntimeAsync(this.AppId, this.Output, proxy, cancellationToken);
 }