@Test
public void testNoDelete() throws Exception {

  Random r = new Random();
  long seed = r.nextLong();
  r.setSeed(seed);
  System.out.println("SEED: " + seed);
  List<Path> dirs = buildDirs(r, base, 20);
  createDirs(new Path("."), dirs);
  FakeDefaultContainerExecutor exec = new FakeDefaultContainerExecutor();
  Configuration conf = new Configuration();
  conf.setInt(YarnConfiguration.DEBUG_NM_DELETE_DELAY_SEC, -1);
  exec.setConf(conf);
  DeletionService del = new DeletionService(exec);
  try {
    del.init(conf);
    del.start();
    for (Path p : dirs) {
      FileDeletionTask deletionTask = new FileDeletionTask(del,
          (Long.parseLong(p.getName()) % 2) == 0 ? null : "dingo", p, null);
      del.delete(deletionTask);
    }
    int msecToWait = 20 * 1000;
    for (Path p : dirs) {
      while (msecToWait > 0 && lfs.util().exists(p)) {
        Thread.sleep(100);
        msecToWait -= 100;
      }
      assertTrue(lfs.util().exists(p));
    }
  } finally {
    del.stop();
  }
}