paulirwin commented on code in PR #1052: URL: https://github.com/apache/lucenenet/pull/1052#discussion_r1867932989
########## src/Lucene.Net.Tests.Replicator/IndexAndTaxonomyRevisionTest.cs: ########## @@ -178,7 +178,10 @@ public void TestOpen() offset = skip; } src.ReadBytes(srcBytes, offset, srcBytes.Length - offset); - @in.Read(inBytes, offset, inBytes.Length - offset); + + var numRead = @in.Read(inBytes, offset, inBytes.Length - offset); // LUCENENET specific - asserting that we read the entire buffer + assertEquals(inBytes.Length - offset, numRead); Review Comment: I'd like to please reconsider leaving this as-is as of my latest changes rather than suppressing the warning. 1. It adds another assertion that makes our tests more robust than upstream. 2. I've already added a LUCENENET-specific comment to it explaining the divergence, as is our standard practice. 3. It resolves the warning, in IMO a cleaner way than a suppression would. 4. It demonstrates best practices of reviewing the result of the Read call to ensure you didn't hit an end of stream, even if semi-redundantly asserted below. 5. It achieves your prior concern about not having an exception being thrown by ReadExactly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org