Skip to content

Commit

Permalink
General API and global ask timeout setting fix (#5773)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkatufus authored Mar 29, 2022
1 parent aac587a commit 339325d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/Akka.TestKit/TestKitBase_Expect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ private T InternalExpectMsg<T>(
Action<T> msgAssert,
Action<IActorRef> senderAssert,
string hint,
CancellationToken cancellationToken = default)
CancellationToken cancellationToken)
{
return InternalExpectMsgAsync(timeout, msgAssert, senderAssert, hint, cancellationToken)
.ConfigureAwait(false).GetAwaiter().GetResult();
Expand Down Expand Up @@ -475,7 +475,7 @@ public void ExpectNoMsg(CancellationToken cancellationToken = default)
}

/// <inheritdoc cref="ExpectNoMsg(CancellationToken)"/>
public async ValueTask ExpectNoMsgAsync(CancellationToken cancellationToken)
public async ValueTask ExpectNoMsgAsync(CancellationToken cancellationToken = default)
{
await InternalExpectNoMsgAsync(RemainingOrDefault, cancellationToken)
.ConfigureAwait(false);
Expand Down Expand Up @@ -596,7 +596,7 @@ public IReadOnlyCollection<T> ExpectMsgAllOf<T>(

public async IAsyncEnumerable<T> ExpectMsgAllOfAsync<T>(
IReadOnlyCollection<T> messages,
CancellationToken cancellationToken = default)
[EnumeratorCancellation] CancellationToken cancellationToken = default)
{
var enumerable = InternalExpectMsgAllOfAsync(RemainingOrDefault, messages, cancellationToken: cancellationToken)
.ConfigureAwait(false).WithCancellation(cancellationToken);
Expand Down
1 change: 1 addition & 0 deletions src/core/Akka.Tests.Shared.Internals/AkkaSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 339325d

Please sign in to comment.