Skip to content

Commit

Permalink
Fix test failure in Release bulid
Browse files Browse the repository at this point in the history
  • Loading branch information
mayuki committed Jan 11, 2024
1 parent 634f06b commit ba58c8f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/MagicOnion.Client.Tests/StreamingHubClientTestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ static byte[] BuildResponsePayload<T>(int messageId, int methodId, T response)
{
// Array[3][messageId (int), methodId (int), request body...]
var messagePackReader = new MessagePackReader(payload);
Debug.Assert(messagePackReader.ReadArrayHeader() == 3);
var arraySize = messagePackReader.ReadArrayHeader();
Debug.Assert(arraySize == 3);
var messageId = messagePackReader.ReadInt32();
var methodId = messagePackReader.ReadInt32();
return (messageId, methodId, MessagePackSerializer.Deserialize<T>(ref messagePackReader));
Expand All @@ -102,7 +103,8 @@ static byte[] BuildResponsePayload<T>(int messageId, int methodId, T response)
{
// Array[2][methodId (int), request body...]
var messagePackReader = new MessagePackReader(payload);
Debug.Assert(messagePackReader.ReadArrayHeader() == 2);
var arraySize = messagePackReader.ReadArrayHeader();
Debug.Assert(arraySize == 2);
var methodId = messagePackReader.ReadInt32();
return (methodId, MessagePackSerializer.Deserialize<T>(ref messagePackReader));
}
Expand Down

0 comments on commit ba58c8f

Please sign in to comment.