  @Test
  public void testBackgroundCompaction() throws Exception {

    Options options = new Options();
    options.maxOpenFiles(100);
    options.createIfMissing(true);
    DbImpl db = new DbImpl(this.databaseDir, options);
    Random random = new Random(301);
    for (int i = 0; i < 200000 * STRESS_FACTOR; i++) {
      db.put(
          randomString(random, 64).getBytes(),
          new byte[] { 0x01 },
          new WriteOptions().sync(false)
      );
      db.get(randomString(random, 64).getBytes());
      if ((i % 50000) == 0 && i != 0) {
        System.out.println(i + " rows written");
      }
    }
  }