Skip to content

Commit 3bb5914

Browse files
author
Vladimir Kotal
committed
avoid leading slash on resource files
1 parent 0e74606 commit 3bb5914

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/history/FileHistoryCacheTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public void testStoreAndGetIncrementalTags() throws Exception {
170170

171171
// Add bunch of changesets with file based changes and tags.
172172
MercurialRepositoryTest.runHgCommand(reposRoot, "import",
173-
getClass().getResource("/history/hg-export-tag.txt").getPath());
173+
new File(getClass().getResource("/history/hg-export-tag.txt").getFile()).getAbsolutePath());
174174

175175
// Perform incremental reindex.
176176
repo.createCache(cache, cache.getLatestCachedRevision(repo));
@@ -293,7 +293,7 @@ public void testStoreAndGet() throws Exception {
293293

294294
// test incremental update
295295
MercurialRepositoryTest.runHgCommand(reposRoot, "import",
296-
getClass().getResource("/history/hg-export.txt").getPath());
296+
new File(getClass().getResource("/history/hg-export.txt").getFile()).getAbsolutePath());
297297

298298
repo.createCache(cache, cache.getLatestCachedRevision(repo));
299299

@@ -493,11 +493,11 @@ public void testRenamedFilePlusChangesBranched() throws Exception {
493493

494494
// Branch the repo and add one changeset.
495495
runHgCommand(reposRoot, "unbundle",
496-
getClass().getResource("/history/hg-branch.bundle").getPath());
496+
new File(getClass().getResource("/history/hg-branch.bundle").getFile()).getAbsolutePath());
497497

498498
// Import changesets which rename one of the files in the default branch.
499499
runHgCommand(reposRoot, "import",
500-
getClass().getResource("/history/hg-export-renamed.txt").getPath());
500+
new File(getClass().getResource("/history/hg-export-renamed.txt").getFile()).getAbsolutePath());
501501

502502
// Switch to the newly created branch.
503503
runHgCommand(reposRoot, "update", "mybranch");

0 commit comments

Comments
 (0)