// open a new writer w/ KeepOnlyLastCommit policy, so it will delete "s1"
// commit.
new IndexWriter(dir, getConfig(random, null)).close();
assertFalse("snapshotted commit should not exist", dir.fileExists(ic.getSegmentsFileName()));
// Now reinit SDP from the commits in the index - the snapshot id should not
// exist anymore.
sdp = getDeletionPolicy(sdp.getSnapshots());
new IndexWriter(dir, getConfig(random, sdp)).close();