Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Test
public void testDelete() {
StorageRootInMemory storage = new StorageRootInMemory(ZooConfig.getFilePageSize());
StorageChannelOutput out = storage.getWriter(false);
int pageId = out.allocateAndSeek(DATA_TYPE.GENERIC_INDEX, 0);
out.writeShort((short) -1);
out.flush();
assertEquals(2, storage.statsGetPageCount());
System.out.println(storage.getFsm().debugPageIds());
storage.reportFreePage(pageId);
assertEquals(2, storage.statsGetPageCount());
assertTrue(storage.getFsm().debugIsPageIdInFreeList(pageId));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment