diff --git a/Assets/Mirror/Tests/Editor/NetworkServer/NetworkServerTest.cs b/Assets/Mirror/Tests/Editor/NetworkServer/NetworkServerTest.cs index 164c57bdd..6031dafc5 100644 --- a/Assets/Mirror/Tests/Editor/NetworkServer/NetworkServerTest.cs +++ b/Assets/Mirror/Tests/Editor/NetworkServer/NetworkServerTest.cs @@ -632,6 +632,7 @@ public void Send_ClientToServerMessage_UnknownMessageIdDisconnects() // send a message without a registered handler NetworkClient.Send(new TestMessage1()); + LogAssert.Expect(LogType.Error, $"NetworkServer: failed to unpack and invoke message. Disconnecting 1."); ProcessMessages(); // should have been disconnected @@ -684,6 +685,7 @@ public void Send_ServerToClientMessage_UnknownMessageIdDisconnects() // send a message without a registered handler connectionToClient.Send(new TestMessage1()); + LogAssert.Expect(LogType.Error, $"NetworkClient: failed to unpack and invoke message. Disconnecting."); ProcessMessages(); // should have been disconnected @@ -866,6 +868,7 @@ public void UnregisterHandler() // unregister, send again, should not be called again NetworkServer.UnregisterHandler(); NetworkClient.Send(new TestMessage1()); + LogAssert.Expect(LogType.Error, $"NetworkServer: failed to unpack and invoke message. Disconnecting 1."); ProcessMessages(); Assert.That(variant1Called, Is.EqualTo(1)); } @@ -889,6 +892,7 @@ public void ClearHandler() // clear handlers, send again, should not be called again NetworkServer.ClearHandlers(); NetworkClient.Send(new TestMessage1()); + LogAssert.Expect(LogType.Error, $"NetworkServer: failed to unpack and invoke message. Disconnecting 1."); ProcessMessages(); Assert.That(variant1Called, Is.EqualTo(1)); }