Skip to content

Commit 42dfbce

Browse files
Fix AskTimeoutException message formatting bug (#7350)
Co-authored-by: Aaron Stannard <aaron@petabridge.com>
1 parent 33fd92d commit 42dfbce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/core/Akka.Tests/Actor/AskSpec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public async Task Ask_should_honor_config_specified_timeout()
218218
}
219219
catch (AskTimeoutException e)
220220
{
221-
Assert.Equal("Timeout after 00:00:03 seconds", e.Message);
221+
Assert.Equal("Timeout after 3.00 seconds", e.Message);
222222
}
223223
}
224224

src/core/Akka/Actor/Futures.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public static Task<T> Ask<T>(this ICanTell self, Func<IActorRef, object> message
137137

138138
ctr1 = timeoutCancellation.Token.Register(() =>
139139
{
140-
result.TrySetException(new AskTimeoutException($"Timeout after {timeout} seconds"));
140+
result.TrySetException(new AskTimeoutException($"Timeout after {timeout.Value.TotalSeconds:F2} seconds"));
141141
});
142142

143143
timeoutCancellation.CancelAfter(timeout.Value);

0 commit comments

Comments
 (0)