diff --git a/src/core/Akka.TestKit.Tests/TestEventListenerTests/UnhandledMessageEventFilterTests.cs b/src/core/Akka.TestKit.Tests/TestEventListenerTests/UnhandledMessageEventFilterTests.cs index 33d406496ad..c6cc9a90847 100644 --- a/src/core/Akka.TestKit.Tests/TestEventListenerTests/UnhandledMessageEventFilterTests.cs +++ b/src/core/Akka.TestKit.Tests/TestEventListenerTests/UnhandledMessageEventFilterTests.cs @@ -5,7 +5,6 @@ // //----------------------------------------------------------------------- -using System.Text.RegularExpressions; using System.Threading.Tasks; using Akka.Actor; using Akka.Event; @@ -32,7 +31,7 @@ protected override void SendRawLogEventMessage(object message) public async Task Unhandled_message_should_produce_info_message() { await EventFilter - .Info(new Regex("^Unhandled message from")) + .Info() .ExpectOneAsync(() => { _unhandledMessageActor.Tell("whatever"); return Task.CompletedTask; diff --git a/src/core/Akka.TestKit/EventFilter/TestEventListener.cs b/src/core/Akka.TestKit/EventFilter/TestEventListener.cs index 1b60027434e..efc7295091c 100644 --- a/src/core/Akka.TestKit/EventFilter/TestEventListener.cs +++ b/src/core/Akka.TestKit/EventFilter/TestEventListener.cs @@ -74,16 +74,7 @@ protected override bool Receive(object message) case DeadLetter letter: HandleDeadLetter(letter); break; - - case UnhandledMessage un: - { - var rcp = un.Recipient; - var info = new Info(rcp.Path.ToString(), rcp.GetType(), "Unhandled message from " + un.Sender + ": " + un.Message); - if (!ShouldFilter(info)) - Print(info); - break; - } - + default: Print(new Debug(Context.System.Name,GetType(),message)); break;