Skip to content

Commit 2ca3b5f

Browse files
committed
fix test
1 parent aa6ffa0 commit 2ca3b5f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/index/IndexDatabaseTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,13 @@ private void checkDataExistence(String fileName, boolean shouldExist) {
213213

214214
for (String dirName : new String[] {"historycache", "annotationcache", IndexDatabase.XREF_DIR}) {
215215
File dataDir = new File(env.getDataRootFile(), dirName);
216-
File dataFile = new File(dataDir, TandemPath.join(fileName, ".gz"));
216+
String cacheFile;
217+
if (dirName.equals("annotationcache")) {
218+
cacheFile = fileName;
219+
} else {
220+
cacheFile = TandemPath.join(fileName, ".gz");
221+
}
222+
File dataFile = new File(dataDir, cacheFile);
217223

218224
if (shouldExist) {
219225
assertTrue(dataFile.exists(), "file " + fileName + " not found in " + dirName);

0 commit comments

Comments
 (0)