diff --git a/src/core/Akka.TestKit/TestKitBase_Expect.cs b/src/core/Akka.TestKit/TestKitBase_Expect.cs index 07bd3f864fc..e4310669ddf 100644 --- a/src/core/Akka.TestKit/TestKitBase_Expect.cs +++ b/src/core/Akka.TestKit/TestKitBase_Expect.cs @@ -373,7 +373,7 @@ private T InternalExpectMsg( Action msgAssert, Action senderAssert, string hint, - CancellationToken cancellationToken = default) + CancellationToken cancellationToken) { return InternalExpectMsgAsync(timeout, msgAssert, senderAssert, hint, cancellationToken) .ConfigureAwait(false).GetAwaiter().GetResult(); @@ -475,7 +475,7 @@ public void ExpectNoMsg(CancellationToken cancellationToken = default) } /// - public async ValueTask ExpectNoMsgAsync(CancellationToken cancellationToken) + public async ValueTask ExpectNoMsgAsync(CancellationToken cancellationToken = default) { await InternalExpectNoMsgAsync(RemainingOrDefault, cancellationToken) .ConfigureAwait(false); @@ -596,7 +596,7 @@ public IReadOnlyCollection ExpectMsgAllOf( public async IAsyncEnumerable ExpectMsgAllOfAsync( IReadOnlyCollection messages, - CancellationToken cancellationToken = default) + [EnumeratorCancellation] CancellationToken cancellationToken = default) { var enumerable = InternalExpectMsgAllOfAsync(RemainingOrDefault, messages, cancellationToken: cancellationToken) .ConfigureAwait(false).WithCancellation(cancellationToken); diff --git a/src/core/Akka.Tests.Shared.Internals/AkkaSpec.cs b/src/core/Akka.Tests.Shared.Internals/AkkaSpec.cs index b58345a7b53..797eb826e56 100644 --- a/src/core/Akka.Tests.Shared.Internals/AkkaSpec.cs +++ b/src/core/Akka.Tests.Shared.Internals/AkkaSpec.cs @@ -35,6 +35,7 @@ public abstract class AkkaSpec : Xunit2.TestKit //AkkaSpec is not part of Tes stdout-loglevel = WARNING serialize-messages = on actor { + ask-timeout = 20s #default-dispatcher { # executor = fork-join-executor # fork-join-executor {