Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,8 @@ void testWriteMoreThanMaxFlushSize(boolean flushDelay, boolean enablePiggybackin
assertInstanceOf(RatisBlockOutputStream.class,
keyOutputStream.getStreamEntries().get(0).getOutputStream());

assertEquals(4, blockOutputStream.getBufferPool().getSize());
assertThat(blockOutputStream.getBufferPool().getSize())
.isLessThanOrEqualTo(4);
// writtenDataLength as well flushedDataLength will be updated here
assertEquals(dataLength, blockOutputStream.getWrittenDataLength());

Expand Down Expand Up @@ -729,7 +730,8 @@ void testWriteMoreThanMaxFlushSize(boolean flushDelay, boolean enablePiggybackin
// Since the data in the buffer is already flushed, flush here will have
// no impact on the counters and data structures

assertEquals(4, blockOutputStream.getBufferPool().getSize());
assertThat(blockOutputStream.getBufferPool().getSize())
.isLessThanOrEqualTo(4);
assertEquals(dataLength, blockOutputStream.getWrittenDataLength());
// dataLength > MAX_FLUSH_SIZE
assertEquals(flushDelay ? MAX_FLUSH_SIZE : dataLength,
Expand Down