Skip to content

Commit

Permalink
Fix of duplication info message for unhandled message (#6532). (#6730)
Browse files Browse the repository at this point in the history
  • Loading branch information
F0b0s authored May 4, 2023
1 parent 8a26155 commit 5782949
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// </copyright>
//-----------------------------------------------------------------------

using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Akka.Actor;
using Akka.Event;
Expand All @@ -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;
Expand Down
11 changes: 1 addition & 10 deletions src/core/Akka.TestKit/EventFilter/TestEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5782949

Please sign in to comment.