diff test/org/tmatesoft/hg/test/TestCommit.java @ 626:5afc7eedb3dd v1.1rc1

@since, TODOs. Tests: add 1 sec to deal with fs timestamp granularity on linux
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 21 May 2013 19:30:12 +0200
parents 507602cb4fb3
children 6526d8adbc0f
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/TestCommit.java	Tue May 21 17:24:22 2013 +0200
+++ b/test/org/tmatesoft/hg/test/TestCommit.java	Tue May 21 19:30:12 2013 +0200
@@ -39,6 +39,7 @@
 import org.tmatesoft.hg.internal.CommitFacility;
 import org.tmatesoft.hg.internal.DirstateReader;
 import org.tmatesoft.hg.internal.DataSerializer.ByteArrayDataSource;
+import org.tmatesoft.hg.internal.FileChangeMonitor;
 import org.tmatesoft.hg.internal.FileContentSupplier;
 import org.tmatesoft.hg.internal.Internals;
 import org.tmatesoft.hg.internal.Transaction;
@@ -343,6 +344,10 @@
 		Nodeid c2 = cmd.getCommittedRevision();
 		errorCollector.assertEquals(c2, hgRepo.getBookmarks().getRevision(activeBookmark));
 		//
+		if (!Internals.runningOnWindows()) {
+			// need change to happen not the same moment as the last commit (and read of bookmark file)
+			Thread.sleep(1000); // XXX remove once better file change detection in place
+		}
 		eh.run("hg", "bookmark", activeBookmark, "--force", "--rev", initialBookmarkRevision.toString());
 		//
 		RepoUtils.modifyFileAppend(fileD, " 2 \n");