snuyanzin commented on code in PR #21368:
URL: https://github.com/apache/flink/pull/21368#discussion_r1031166917
##########
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateChunkReaderTest.java:
##########
@@ -68,27 +81,28 @@ public void testBufferRecycledOnSuccess() throws
IOException, InterruptedExcepti
.readChunk(stream, serializer.getHeaderLength(), handler,
"channelInfo", 0);
} finally {
checkState(!handler.requestedBuffers.isEmpty());
- assertTrue(
- handler.requestedBuffers.stream()
- .allMatch(TestChannelStateByteBuffer::isRecycled));
+ assertThat(
+ handler.requestedBuffers.stream()
+
.allMatch(TestChannelStateByteBuffer::isRecycled))
+ .isTrue();
}
}
@Test
- public void testBuffersNotRequestedForEmptyStream() throws IOException,
InterruptedException {
+ void testBuffersNotRequestedForEmptyStream() throws IOException,
InterruptedException {
ChannelStateSerializer serializer = new ChannelStateSerializerImpl();
TestRecoveredChannelStateHandler handler = new
TestRecoveredChannelStateHandler();
try (FSDataInputStream stream = getStream(serializer, 0)) {
new ChannelStateChunkReader(serializer)
.readChunk(stream, serializer.getHeaderLength(), handler,
"channelInfo", 0);
} finally {
- assertTrue(handler.requestedBuffers.isEmpty());
+ assertThat(handler.requestedBuffers.isEmpty()).isTrue();
Review Comment:
```suggestion
assertThat(handler.requestedBuffers).isEmpty();
```
There is `isEmpty()` method from assertJ
--
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]