Skip to content

Commit

Permalink
harden RemoteActorsLeakSpec (#4315)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb committed Mar 10, 2020
1 parent 085a721 commit 1397ea0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/core/Akka.Remote.Tests/ActorsLeakSpec.cs
Expand Up @@ -26,7 +26,7 @@ public class ActorsLeakSpec : AkkaSpec
{
public static readonly Config Confg = ConfigurationFactory.ParseString(@"
akka.actor.provider = remote
akka.loglevel = DEBUG
akka.loglevel = INFO
akka.remote.dot-netty.tcp.applied-adapters = [trttl]
akka.remote.dot-netty.tcp.hostname = 127.0.0.1
akka.remote.log-lifecycle-events = on
Expand Down Expand Up @@ -148,9 +148,11 @@ public void Remoting_must_not_leak_actors()
Sys.ActorSelection(new RootActorPath(remoteAddress) / "user" / "stoppable").Tell(new Identify(1));
ExpectMsg<ActorIdentity>().Subject.ShouldNotBe(null);

var afterQuarantineActors = targets.SelectMany(CollectLiveActors).ToImmutableHashSet();

AssertActors(beforeQuarantineActors, afterQuarantineActors);
AwaitAssert(() =>
{
var afterQuarantineActors = targets.SelectMany(CollectLiveActors).ToImmutableHashSet();
AssertActors(beforeQuarantineActors, afterQuarantineActors);
}, TimeSpan.FromSeconds(10));
}
finally
{
Expand Down

0 comments on commit 1397ea0

Please sign in to comment.