Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java
index 1c9a3927d..3bdf040fe 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java
@@ -844,12 +844,17 @@ public class EclipseTest extends ResourceTest {
protected void setContentsAndEnsureModified(IFile file, InputStream stream) throws CoreException, CVSException {
ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor(file);
int count = 0;
+ file.setContents(stream, false, false, null);
do {
- file.setContents(stream, false, false, null);
assertTrue("Timestamp granularity is too small. Increase test wait factor", count <= CVSTestSetup.WAIT_FACTOR);
if (!cvsFile.isModified(null)) {
waitMsec(1500);
count++;
+ try {
+ file.setContents(new ByteArrayInputStream(getFileContents(file).getBytes()), false, false, null);
+ } catch (IOException e) {
+ throw new CVSException("Error reading file contents", e);
+ }
}
} while (!cvsFile.isModified(null));
}

Back to the top