summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2018-06-08 17:22:54 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2018-06-08 21:43:39 +0200
commit5f27032fb85694a093f827581216d4ffb99db68b (patch)
tree508b6fdaa5db0f0bbf49f648d0e9fe60a692d50b /org.eclipse.jgit.test
parent1cb8c5d7fe2d88c127bafcff3800b91e5ab5eda4 (diff)
downloadjgit-5f27032fb85694a093f827581216d4ffb99db68b.tar.gz
jgit-5f27032fb85694a093f827581216d4ffb99db68b.zip
Use constant for ".lock"
Change-Id: Id65dc94c970ffd3ca3d3d4a5d57123c95d29e8af Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java
index 757ebb2987..b2fae316c3 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java
@@ -45,8 +45,9 @@
package org.eclipse.jgit.internal.storage.file;
-import static org.eclipse.jgit.lib.Constants.CHARSET;
import static org.eclipse.jgit.junit.Assert.assertEquals;
+import static org.eclipse.jgit.lib.Constants.CHARSET;
+import static org.eclipse.jgit.lib.Constants.LOCK_SUFFIX;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -819,11 +820,11 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase {
// Check that the involved refs are the same despite the failure
assertExists(false, toName);
if (!toLock.equals(toName))
- assertExists(false, toName + ".lock");
- assertExists(true, toLock + ".lock");
+ assertExists(false, toName + LOCK_SUFFIX);
+ assertExists(true, toLock + LOCK_SUFFIX);
if (!toLock.equals(fromName))
- assertExists(false, "logs/" + fromName + ".lock");
- assertExists(false, "logs/" + toName + ".lock");
+ assertExists(false, "logs/" + fromName + LOCK_SUFFIX);
+ assertExists(false, "logs/" + toName + LOCK_SUFFIX);
assertEquals(oldHeadId, db.resolve(Constants.HEAD));
assertEquals(oldfromId, db.resolve(fromName));
assertNull(db.resolve(toName));