Add a utility to make unique files/dirs easier, closes https://github.com/OpenHFT/Chronicle-Core/issues/149

This commit is contained in:
Peter Lawrey
2020-11-02 08:56:07 +00:00
parent 7dedb9cf89
commit 184dd87e57
23 changed files with 56 additions and 54 deletions
@@ -37,7 +37,7 @@ import static org.junit.Assert.assertEquals;
public class OpenJDKAndHashMapExamplesTest {
private static final SimpleDateFormat YYYYMMDD = new SimpleDateFormat("yyyyMMdd");
private static final String TMP = System.getProperty("java.io.tmpdir");
private static final String TMP = OS.getTarget();
public static long parseYYYYMMDD(String s) {
try {
@@ -50,7 +50,7 @@ public class OpenJDKAndHashMapExamplesTest {
@Test
public void bondExample() throws IOException, InterruptedException {
File file = new File(TMP + "/chm-myBondPortfolioCHM-" + System.nanoTime());
File file = new File(TMP + "/chm-myBondPortfolioCHM-" + Time.uniqueId());
file.deleteOnExit();
ChronicleMap<String, BondVOInterface> chm = ChronicleMapBuilder