Skip to content

Commit

Permalink
release() -> deallocate() in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Feb 16, 2016
1 parent 2c00f29 commit cb99750
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void testDeallocateReleasesManagedBuffer() throws Exception {
ByteBuf body = (ByteBuf) managedBuf.convertToNetty();
assertEquals(2, body.refCnt());
MessageWithHeader msg = new MessageWithHeader(managedBuf, header, body, body.readableBytes());
msg.deallocate();
assert(msg.release());
Mockito.verify(managedBuf, Mockito.times(1)).release();
assertEquals(0, body.refCnt());
}
Expand All @@ -94,7 +94,7 @@ private void testFileRegionBody(int totalWrites, int writesPerCall) throws Excep
for (long i = 0; i < 8; i++) {
assertEquals(i, result.readLong());
}
msg.deallocate();
assert(msg.release());
}

private ByteBuf doWrite(MessageWithHeader msg, int minExpectedWrites) throws Exception {
Expand Down

0 comments on commit cb99750

Please sign in to comment.