Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Muskalla2010-07-30 11:51:49 -0400
committerBenjamin Muskalla2010-07-30 11:51:49 -0400
commit0b300c7cf16dbf3c6d5d504a54edc0f57b992ab7 (patch)
treee91fd4726c34cc31acdf964de85d6b0bde95aa93 /org.eclipse.egit.core.test
parent96cf50208c3a3f916de42bef73eef273a17f0ff9 (diff)
downloadegit-0b300c7cf16dbf3c6d5d504a54edc0f57b992ab7.tar.gz
egit-0b300c7cf16dbf3c6d5d504a54edc0f57b992ab7.tar.xz
egit-0b300c7cf16dbf3c6d5d504a54edc0f57b992ab7.zip
Fixed deprecated API usage
Besides fixing the deprecated API call, also moved the sleep in AppOperationTest to a more reasonable location. For me, the tests failed most of the time as localTime and the timestamp in the repo were the same. I think it makes more sense to wait after the commit to have a time gap between commit and file change Change-Id: I3c481096f1b89f35b0b232fbcd8f4b1ad0d012fc Signed-off-by: Benjamin Muskalla <bmuskalla@eclipsesource.com>
Diffstat (limited to 'org.eclipse.egit.core.test')
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/AddOperationTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/AddOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/AddOperationTest.java
index cd9ea0a50..467120c71 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/AddOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/AddOperationTest.java
@@ -136,6 +136,8 @@ public class AddOperationTest extends GitTestCase {
testRepository.lastModifiedInIndex(file1.getLocation()
.toPortableString()));
+ Thread.sleep(1000);
+
file1.setContents(
new ByteArrayInputStream("other text".getBytes(project.project
.getDefaultCharset())), 0, null);
@@ -143,7 +145,6 @@ public class AddOperationTest extends GitTestCase {
new ByteArrayInputStream("other text".getBytes(project.project
.getDefaultCharset())), 0, null);
- Thread.sleep(1000);
assertFalse(file1.getLocalTimeStamp() == testRepository
.lastModifiedInIndex(file1.getLocation().toPortableString()));
assertFalse(file2.getLocalTimeStamp() == testRepository

Back to the top