diff options
author | Terry Parker <tparker@google.com> | 2015-10-19 17:33:50 -0700 |
---|---|---|
committer | Terry Parker <tparker@google.com> | 2015-10-20 15:57:31 -0700 |
commit | 069040ddad625ec48c9d1dd2b3ecc9a0cb8a40f0 (patch) | |
tree | 0dfc07556ae83cab39c1f9f1053d532384fb76a4 /org.eclipse.jgit.test/tst | |
parent | eec37d2334bd09271773ee519e20d24e5e90da81 (diff) | |
download | jgit-069040ddad625ec48c9d1dd2b3ecc9a0cb8a40f0.tar.gz jgit-069040ddad625ec48c9d1dd2b3ecc9a0cb8a40f0.zip |
Push control of time into MockSystemReader
LocalDiskRepositoryTestCase and TestRepository have competing ideas
about time. Push them into MockSystemReader so they can
cooperate.
Rename getClock() methods that return Dates to getDate().
Change-Id: Ibbd9fe7f85d0064b0a19e3b675b9718a9e67c479
Signed-off-by: Terry Parker <tparker@google.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst')
3 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/junit/TestRepositoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/junit/TestRepositoryTest.java index fbb9eecdff..b69b8e01e0 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/junit/TestRepositoryTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/junit/TestRepositoryTest.java @@ -307,9 +307,9 @@ public class TestRepositoryTest { RevCommit toPick = tr.commit() .parent(tr.commit().create()) // Can't cherry-pick root. .author(new PersonIdent("Cherrypick Author", "cpa@example.com", - tr.getClock(), tr.getTimeZone())) + tr.getDate(), tr.getTimeZone())) .author(new PersonIdent("Cherrypick Committer", "cpc@example.com", - tr.getClock(), tr.getTimeZone())) + tr.getDate(), tr.getTimeZone())) .message("message to cherry-pick") .add("bar", "bar contents\n") .create(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkFilterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkFilterTest.java index 643ba26d9a..8ab972837c 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkFilterTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkFilterTest.java @@ -250,14 +250,14 @@ public class RevWalkFilterTest extends RevWalkTestCase { final RevCommit b = commit(a); tick(100); - Date since = getClock(); + Date since = getDate(); final RevCommit c1 = commit(b); tick(100); final RevCommit c2 = commit(b); tick(100); - Date until = getClock(); + Date until = getDate(); final RevCommit d = commit(c1, c2); tick(100); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkTestCase.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkTestCase.java index 881deb1f5a..30586ee1e2 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkTestCase.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkTestCase.java @@ -70,8 +70,8 @@ public abstract class RevWalkTestCase extends RepositoryTestCase { return new RevWalk(db); } - protected Date getClock() { - return util.getClock(); + protected Date getDate() { + return util.getDate(); } protected void tick(final int secDelta) { |