nastra commented on code in PR #3654:
URL: https://github.com/apache/parquet-java/pull/3654#discussion_r3549499965
##########
parquet-common/src/test/java/org/apache/parquet/bytes/TestByteBufferInputStreams.java:
##########
@@ -155,12 +175,11 @@ public void testReadByte() throws Exception {
int length = stream.available();
for (int i = 0; i < length; i += 1) {
- Assert.assertEquals("Position should increment", i, stream.position());
- Assert.assertEquals(i, stream.read());
+ assertThat(stream.position()).as("Position should
increment").isEqualTo(i);
+ assertThat(stream.read()).isEqualTo(i);
}
- assertThrows(
- "Should throw EOFException at end of stream", EOFException.class,
(Callable<Integer>) stream::read);
+ assertThatThrownBy(stream::read).isInstanceOf(EOFException.class);
Review Comment:
the exception message is null so we're omitting the hasMessage() check here
and in a few other places. Depending on the JDK version, it's also possible
that the exception either has a null message or has some message, so it's safer
to omit the check
--
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]