diff --git a/src/core/Akka.TestKit.Tests/TestEventListenerTests/DeadLettersEventFilterTests.cs b/src/core/Akka.TestKit.Tests/TestEventListenerTests/DeadLettersEventFilterTests.cs index 92212f7264d..b69e48e0fb4 100644 --- a/src/core/Akka.TestKit.Tests/TestEventListenerTests/DeadLettersEventFilterTests.cs +++ b/src/core/Akka.TestKit.Tests/TestEventListenerTests/DeadLettersEventFilterTests.cs @@ -5,6 +5,7 @@ // //----------------------------------------------------------------------- +using System; using System.Threading.Tasks; using Akka.Actor; using Akka.Event; @@ -47,6 +48,26 @@ await eventFilter.DeadLetter().ExpectOneAsync(async () => _deadActor.Tell("whatever"); }); } + + [Fact] + public async Task Should_check_properly_type_parameters() + { + await EventFilter.DeadLetter().And.DeadLetter().ExpectAsync(2, async () => + { + _deadActor.Tell(5); + _deadActor.Tell(1.2); + }); + } + + [Fact] + public async Task Should_check_properly_type_parameters_when_one_of_them_string() + { + await EventFilter.DeadLetter().And.DeadLetter().ExpectAsync(2, async () => + { + _deadActor.Tell("asd"); + _deadActor.Tell(1.2); + }); + } } public class DeadLettersEventFilterTests : DeadLettersEventFilterTestsBase diff --git a/src/core/Akka.TestKit/EventFilter/TestEventListener.cs b/src/core/Akka.TestKit/EventFilter/TestEventListener.cs index 0b3270c49e6..97553aec522 100644 --- a/src/core/Akka.TestKit/EventFilter/TestEventListener.cs +++ b/src/core/Akka.TestKit/EventFilter/TestEventListener.cs @@ -108,10 +108,7 @@ private void HandleDeadLetter(DeadLetter message) ? "Received dead system message: " + msg : "Received dead letter from " + snd + ": " + msg; var warning2 = new Warning(recipientPath, recipientType, new DeadLetter(msgStr, snd, rcp)); - if (!ShouldFilter(warning2)) - { - Print(warning2); - } + Print(warning2); } } }