From 0d44fb0400415cacacdeba6ed070fefe2cf879c8 Mon Sep 17 00:00:00 2001 From: Matthew Heaton Date: Wed, 15 May 2019 14:44:36 +1000 Subject: [PATCH] Fix repeatable failure of Tail_chopping_group_router_must_throw_exception_if_no_result_will_arrive_within_the_given_time test case. --- src/core/Akka/Routing/TailChopping.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/Akka/Routing/TailChopping.cs b/src/core/Akka/Routing/TailChopping.cs index 435c9dde420..cdd3ec34b8f 100644 --- a/src/core/Akka/Routing/TailChopping.cs +++ b/src/core/Akka/Routing/TailChopping.cs @@ -122,7 +122,14 @@ public override void Send(object message, IActorRef sender) try { - completion.TrySetResult(await (_routees[currentIndex].Ask(message, _within)).ConfigureAwait(false)); + completion.TrySetResult( + await (_routees[currentIndex].Ask(message, _within)).ConfigureAwait(false)); + } + catch (AskTimeoutException) + { + completion.TrySetResult( + new Status.Failure( + new AskTimeoutException($"Ask timed out on {sender} after {_within}"))); } catch (TaskCanceledException) {