@Test
public void testRecoverWithLargeLog()
throws Exception
{
DbStringWrapper db = new DbStringWrapper(new Options(), databaseDir);
db.put("big1", longString(200000, '1'));
db.put("big2", longString(200000, '2'));
db.put("small3", longString(10, '3'));
db.put("small4", longString(10, '4'));
assertEquals(db.numberOfFilesInLevel(0), 0);
db.reopen(new Options().writeBufferSize(100000));
assertEquals(db.numberOfFilesInLevel(0), 3);
assertEquals(db.get("big1"), longString(200000, '1'));
assertEquals(db.get("big2"), longString(200000, '2'));
assertEquals(db.get("small3"), longString(10, '3'));
assertEquals(db.get("small4"), longString(10, '4'));