Skip to content

Commit ca93f73

Browse files
committed
enable history
1 parent 3fca07a commit ca93f73

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/*
21-
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
21+
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
2222
* Portions Copyright (c) 2018, 2020, Chris Fraire <[email protected]>.
2323
* Portions Copyright (c) 2020, 2023, Ric Harris <[email protected]>.
2424
*/
@@ -55,6 +55,7 @@
5555
import org.apache.commons.lang3.time.DateUtils;
5656
import org.eclipse.jgit.api.Git;
5757
import org.junit.jupiter.api.AfterEach;
58+
import org.junit.jupiter.api.BeforeAll;
5859
import org.junit.jupiter.api.BeforeEach;
5960
import org.junit.jupiter.api.Test;
6061
import org.junit.jupiter.api.condition.EnabledOnOs;
@@ -90,6 +91,12 @@ class FileHistoryCacheTest {
9091
private boolean savedIsHandleHistoryOfRenamedFiles;
9192
private boolean savedIsTagsEnabled;
9293

94+
@BeforeAll
95+
static void setUpClass() throws Exception {
96+
RuntimeEnvironment env = RuntimeEnvironment.getInstance();
97+
env.setHistoryEnabled(true);
98+
}
99+
93100
/**
94101
* Set up the test environment with repositories and a cache instance.
95102
*/

opengrok-indexer/src/test/java/org/opengrok/indexer/search/context/HistoryContextTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/*
21-
* Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved.
21+
* Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved.
2222
* Portions Copyright (c) 2017, Chris Fraire <[email protected]>.
2323
*/
2424
package org.opengrok.indexer.search.context;
@@ -64,9 +64,12 @@ class HistoryContextTest {
6464

6565
@BeforeAll
6666
static void setUpClass() throws Exception {
67+
RuntimeEnvironment env = RuntimeEnvironment.getInstance();
68+
env.setHistoryEnabled(true);
69+
6770
repositories = new TestRepository();
6871
repositories.create(HistoryContextTest.class.getResource("/repositories"));
69-
RuntimeEnvironment.getInstance().setRepositories(repositories.getSourceRoot());
72+
env.setRepositories(repositories.getSourceRoot());
7073
}
7174

7275
@AfterAll

0 commit comments

Comments
 (0)