diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/LastModifiedResourceComparatorTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/LastModifiedResourceComparatorTests.java index b61261d61..eabbaaffa 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/LastModifiedResourceComparatorTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/LastModifiedResourceComparatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ import static org.junit.Assert.assertTrue; /** * @author Dave Syer + * @author Mahmoud Ben Hassine * */ public class LastModifiedResourceComparatorTests { @@ -58,23 +59,4 @@ public class LastModifiedResourceComparatorTests { assertEquals(1, comparator.compare(new FileSystemResource(temp), new FileSystemResource(FILE_PATH))); } - @Test - public void testCompareNewWithOldAfterCopy() throws Exception { - File temp1 = new File("target/temp1.txt"); - File temp2 = new File("target/temp2.txt"); - if (temp1.exists()) temp1.delete(); - if (temp2.exists()) temp2.delete(); - temp1.getParentFile().mkdirs(); - temp2.createNewFile(); - assertTrue(!temp1.exists() && temp2.exists()); - // For Linux sleep here otherwise files show same - // modified date - Thread.sleep(1000); - // Need to explicitly ask not to preserve the last modified date when we - // copy... - - FileUtils.copyFile(new FileSystemResource(FILE_PATH).getFile(), temp1, false); - assertEquals(1, comparator.compare(new FileSystemResource(temp1), new FileSystemResource(temp2))); - } - }