Skip to content

Commit be32427

Browse files
Akka.TestKit.Tests: fix build warnings (#7568)
1 parent 2564c51 commit be32427

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/core/Akka.TestKit.Tests/Bugfix7145Spec.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ public async Task Should_not_deadlock_when_using_ReceiveAsync_with_ConfigureAwai
4747
var actor = Sys.ActorOf(Props.Create(() => new BuggyActor()));
4848
var probe = CreateTestProbe();
4949
actor.Tell("hello", probe);
50+
#pragma warning disable xUnit1030
5051
var response1 = await probe.ExpectMsgAsync<string>().ConfigureAwait(false);
5152
var response2 = await probe.ExpectMsgAsync<string>().ConfigureAwait(false);
53+
#pragma warning restore xUnit1030
5254
response1.Should().Be("hello1");
5355
response2.Should().Be("hello2");
5456
}

src/core/Akka.TestKit.Tests/TestActorRefTests/NestingActor.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ public class NestingActor : ActorBase
1515

1616
public NestingActor(bool createTestActorRef)
1717
{
18+
// this is supposed to create a top-level actor, so the test is written correctly
19+
#pragma warning disable AK1008
1820
_nested = createTestActorRef ? Context.System.ActorOf<NestedActor>() : new TestActorRef<NestedActor>(Context.System, Props.Create<NestedActor>(), null, null);
21+
#pragma warning restore AK1008
1922
}
2023

2124
protected override bool Receive(object message)

0 commit comments

Comments
 (0)