Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General Akka.TestKit fixes that are found while porting tests to async #5773

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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