Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2015-02-19 00:32:40 +0000
committerAndrey Loskutov2015-02-19 12:08:39 +0000
commit17bf706bbe0cc9dfe03a7f312ce5af6aa7c2cc20 (patch)
tree3174fe27eaec7a92c3e91ea53851935e3f592e0d
parent4e219194b8accd6f713e48571a73920cffb35144 (diff)
downloadegit-17bf706bbe0cc9dfe03a7f312ce5af6aa7c2cc20.tar.gz
egit-17bf706bbe0cc9dfe03a7f312ce5af6aa7c2cc20.tar.xz
egit-17bf706bbe0cc9dfe03a7f312ce5af6aa7c2cc20.zip
Fix test error in StagingViewTest.testMergeConflict
Run org.eclipse.egit.ui.test.stagview.StagingViewTest.testMergeConflict testMergeConflict(org.eclipse.egit.ui.test.stagview.StagingViewTest) org.eclipse.core.internal.resources.ResourceException: Resource is out of sync with the file system: '/GeneralProject/folder/test.txt'. at org.eclipse.core.internal.localstore.FileSystemResourceManager.write(FileSystemResourceManager.java:1076) at org.eclipse.core.internal.resources.File.internalSetContents(File.java:321) at org.eclipse.core.internal.resources.File.setContents(File.java:360) at org.eclipse.egit.ui.common.LocalRepositoryTestCase.setTestFileContent(LocalRepositoryTestCase.java:561) at org.eclipse.egit.ui.test.stagview.StagingViewTest.setContent(StagingViewTest.java:155) at org.eclipse.egit.ui.test.stagview.StagingViewTest.commitOneFileChange(StagingViewTest.java:138) at org.eclipse.egit.ui.test.stagview.StagingViewTest.testMergeConflict(StagingViewTest.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... Change-Id: Ic60e38581d2327e2a4717725670f679d1ee765fe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java
index 75e1d5d942..a42c1f9882 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/LocalRepositoryTestCase.java
@@ -558,6 +558,7 @@ public abstract class LocalRepositoryTestCase extends EGitTestCase {
if (!prj.isAccessible())
throw new IllegalStateException("No project found");
IFile file = prj.getFile(new Path("folder/test.txt"));
+ file.refreshLocal(0, null);
file.setContents(new ByteArrayInputStream(newContent.getBytes(prj
.getDefaultCharset())), 0, null);
}

Back to the top