There was an error while loading. Please reload this page.
1 parent 1186b93 commit 72e05ddCopy full SHA for 72e05dd
tests/MongoDB.Driver.Tests/Core/Connections/BinaryConnectionTests.cs
@@ -374,6 +374,10 @@ public void ReceiveMessage_should_throw_a_FormatException_when_message_is_an_inv
374
using (var stream = new BlockingMemoryStream())
375
{
376
var bytes = BitConverter.GetBytes(length);
377
+ if (!BitConverter.IsLittleEndian)
378
+ {
379
+ Array.Reverse(bytes);
380
+ }
381
stream.Write(bytes, 0, bytes.Length);
382
stream.Seek(0, SeekOrigin.Begin);
383
var encoderSelector = new ReplyMessageEncoderSelector<BsonDocument>(BsonDocumentSerializer.Instance);
0 commit comments