FrankChen021 commented on code in PR #20064:
URL: https://github.com/apache/druid/pull/20064#discussion_r3813285460
##########
multi-stage-query/src/test/java/org/apache/druid/msq/shuffle/output/ByteChunksInputStreamTest.java:
##########
@@ -46,11 +44,11 @@
int c;
while ((c = in.read()) != -1) {
- MatcherAssert.assertThat("InputStream#read contract", c,
Matchers.greaterThanOrEqualTo(0));
+ Assertions.assertTrue(c >= 0, "InputStream#read contract");
Review Comment:
Addressed in f169fe9ea6. Removed the redundant c >= 0 assertion;
ByteChunksInputStream.read() returns b & 0xFF, so the assertion is always true
inside the c != -1 loop. The focused ByteChunksInputStreamTest (6 tests),
Checkstyle, and SpotBugs all pass.
##########
multi-stage-query/src/test/java/org/apache/druid/msq/shuffle/output/ByteChunksInputStreamTest.java:
##########
@@ -62,11 +60,11 @@
int c;
while ((c = in.read()) != -1) {
- MatcherAssert.assertThat("InputStream#read contract", c,
Matchers.greaterThanOrEqualTo(0));
+ Assertions.assertTrue(c >= 0, "InputStream#read contract");
Review Comment:
Addressed in f169fe9ea6. Removed the redundant c >= 0 assertion;
ByteChunksInputStream.read() returns b & 0xFF, so the assertion is always true
inside the c != -1 loop. The focused ByteChunksInputStreamTest (6 tests),
Checkstyle, and SpotBugs all pass.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]