diff --git a/core/src/test/java/ch/cyberduck/core/local/DefaultTemporaryFileServiceTest.java b/core/src/test/java/ch/cyberduck/core/local/DefaultTemporaryFileServiceTest.java index 5e96a1ed62f..46d4a38b900 100755 --- a/core/src/test/java/ch/cyberduck/core/local/DefaultTemporaryFileServiceTest.java +++ b/core/src/test/java/ch/cyberduck/core/local/DefaultTemporaryFileServiceTest.java @@ -37,11 +37,11 @@ public void testExists() { public void testCreateFile() { final String temp = StringUtils.removeEnd(System.getProperty("java.io.tmpdir"), File.separator); final String s = System.getProperty("file.separator"); - assertEquals(String.format("%s%su%sp%s887503681%sf", temp, s, s, s, s), + assertEquals(String.format("%s%su%sp%s1742810335%sf", temp, s, s, s, s), new DefaultTemporaryFileService().create("u", new Path("/p/f", EnumSet.of(Path.Type.file))).getAbsolute()); final Path file = new Path("/p/f", EnumSet.of(Path.Type.file)); file.attributes().setRegion("region"); - assertEquals(String.format("%s%su%sp%s887503681%sf", temp, s, s, s, s), + assertEquals(String.format("%s%su%sp%s1742810335%sf", temp, s, s, s, s), new DefaultTemporaryFileService().create("u", file).getAbsolute()); } @@ -53,14 +53,14 @@ public void testVersion() { final Path file = new Path("/p/f", EnumSet.of(Path.Type.file)); file.attributes().setRegion("region"); file.attributes().setVersionId("2"); - assertEquals(String.format("%s%su%sp%s887551731%sf", temp, s, s, s, s), + assertEquals(String.format("%s%su%sp%s1744299885%sf", temp, s, s, s, s), new DefaultTemporaryFileService().create("u", file).getAbsolute()); } { final Path file = new Path("/p", EnumSet.of(Path.Type.directory)); file.attributes().setRegion("region"); file.attributes().setVersionId("2"); - assertEquals(String.format("%s%su%s887551731%sp", temp, s, s, s), + assertEquals(String.format("%s%su%s1744299885%sp", temp, s, s, s), new DefaultTemporaryFileService().create("u", file).getAbsolute()); } } @@ -71,7 +71,7 @@ public void testCreateContainer() { final String s = System.getProperty("file.separator"); final Path file = new Path("/container", EnumSet.of(Path.Type.directory)); file.attributes().setRegion("region"); - assertEquals(String.format("%s%su%s887503681%scontainer", temp, s, s, s), + assertEquals(String.format("%s%su%s1742810335%scontainer", temp, s, s, s), new DefaultTemporaryFileService().create("u", file).getAbsolute()); } @@ -87,8 +87,8 @@ public void testPathTooLong() { file.attributes().setVersionId("2"); final Local local = new DefaultTemporaryFileService().create("UID", file); final String localFile = local.getAbsolute(); - assertNotEquals(String.format("%s/%s%s/887551731/%s", temp, "UID", testPathDirectory, testPathFile).replace('/', File.separatorChar), localFile); - assertEquals(String.format("%s/%s/%s/887551731/%s", temp, "UID", testPathMD5, testPathFile).replace('/', File.separatorChar), localFile); + assertNotEquals(String.format("%s/%s%s/1744299885/%s", temp, "UID", testPathDirectory, testPathFile).replace('/', File.separatorChar), localFile); + assertEquals(String.format("%s/%s/%s/1744299885/%s", temp, "UID", testPathMD5, testPathFile).replace('/', File.separatorChar), localFile); } @Test @@ -103,8 +103,8 @@ public void testPathNotTooLong() { file.attributes().setVersionId("2"); final Local local = new DefaultTemporaryFileService().create("UID", file); final String localFile = local.getAbsolute(); - assertEquals(String.format("%s/%s%s/887551731/%s", temp, "UID", testPathDirectory, testPathFile).replace('/', File.separatorChar), localFile); - assertNotEquals(String.format("%s/%s%s/887551731/%s", temp, "UID", testPathMD5, testPathFile).replace('/', File.separatorChar), localFile); + assertEquals(String.format("%s/%s%s/1744299885/%s", temp, "UID", testPathDirectory, testPathFile).replace('/', File.separatorChar), localFile); + assertNotEquals(String.format("%s/%s%s/1744299885/%s", temp, "UID", testPathMD5, testPathFile).replace('/', File.separatorChar), localFile); } @Test @@ -115,7 +115,7 @@ public void testTemporaryPath() { final Local local = new DefaultTemporaryFileService().create(file); assertEquals("t.txt", file.getName()); assertEquals("t.txt", local.getName()); - assertEquals("887550770", local.getParent().getName()); + assertEquals("1744270094", local.getParent().getName()); assertEquals("f2", local.getParent().getParent().getName()); assertEquals("f1", local.getParent().getParent().getParent().getName()); } diff --git a/core/src/test/java/ch/cyberduck/core/local/FlatTemporaryFileServiceTest.java b/core/src/test/java/ch/cyberduck/core/local/FlatTemporaryFileServiceTest.java index 1425d834e96..c8634e15e4d 100644 --- a/core/src/test/java/ch/cyberduck/core/local/FlatTemporaryFileServiceTest.java +++ b/core/src/test/java/ch/cyberduck/core/local/FlatTemporaryFileServiceTest.java @@ -53,11 +53,11 @@ public void testExists() { public void testCreateFile() { final String temp = StringUtils.removeEnd(System.getProperty("java.io.tmpdir"), File.separator); final String s = System.getProperty("file.separator"); - assertEquals(String.format("%s%su%s887503681-f", temp, s, s), + assertEquals(String.format("%s%su%s1742810335-f", temp, s, s), new FlatTemporaryFileService().create("u", new Path("/p/f", EnumSet.of(Path.Type.file))).getAbsolute()); final Path file = new Path("/p/f", EnumSet.of(Path.Type.file)); file.attributes().setRegion("region"); - assertEquals(String.format("%s%su%s887503681-f", temp, s, s), + assertEquals(String.format("%s%su%s1742810335-f", temp, s, s), new FlatTemporaryFileService().create("u", file).getAbsolute()); } @@ -67,7 +67,7 @@ public void testCreateContainer() { final String s = System.getProperty("file.separator"); final Path file = new Path("/container", EnumSet.of(Path.Type.directory)); file.attributes().setRegion("region"); - assertEquals(String.format("%s%su%s887503681-container", temp, s, s), + assertEquals(String.format("%s%su%s1742810335-container", temp, s, s), new FlatTemporaryFileService().create("u", file).getAbsolute()); } @@ -99,8 +99,8 @@ public void testPathNotTooLong() { final Local local = new FlatTemporaryFileService().create("UID", file); assertTrue(local.getParent().exists()); final String localFile = local.getAbsolute(); - assertEquals(String.format("%s/%s/887551731-%s", temp, "UID", testPathFile).replace('/', File.separatorChar), localFile); - assertNotEquals(String.format("%s/%s%s/2/887551731-%s", temp, "UID", testPathMD5, testPathFile).replace('/', File.separatorChar), localFile); + assertEquals(String.format("%s/%s/1744299885-%s", temp, "UID", testPathFile).replace('/', File.separatorChar), localFile); + assertNotEquals(String.format("%s/%s%s/2/1744299885-%s", temp, "UID", testPathMD5, testPathFile).replace('/', File.separatorChar), localFile); } @Test