SnapshotUtil { static boolean isOldZnode(String snapshotName) { long abortZnodeAge = System.currentTimeMillis() - getSnapshotTimestamp(snapshotName); return getSnapshotTimestamp(snapshotName) > 0 && abortZnodeAge > Snapshot.ABORT_ZNODE_AGE_THRESHOLD_MS; }    }
@Test public void testInvalidSnapshotName() { Assert.assertTrue(SnapshotUtil.isOldZnode("valid-snapshot-name_S20000309110025")); Assert.assertFalse(SnapshotUtil.isOldZnode("invalid-snapshot-name")); }