summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-11-20 21:53:34 -0500
committerJames Moger <james.moger@gitblit.com>2013-11-29 11:05:51 -0500
commit95cdba46c79d952f2c2baba937e70796674ed57e (patch)
tree9257811c9573519a51450562d43aec98e4aa1cd2 /src/test
parentaa6d43e8b28ff73d69a920e9b3a7b284cfce00c3 (diff)
downloadgitblit-95cdba46c79d952f2c2baba937e70796674ed57e.tar.gz
gitblit-95cdba46c79d952f2c2baba937e70796674ed57e.zip
Extract RepositoryManager from the GitBlit singleton
Change-Id: I265cfaf25e4093ffa5f53f70d8eb1c20d731b7b3
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/gitblit/tests/LuceneExecutorTest.java10
-rw-r--r--src/test/java/de/akquinet/devops/GitBlit4UITests.java26
2 files changed, 7 insertions, 29 deletions
diff --git a/src/test/java/com/gitblit/tests/LuceneExecutorTest.java b/src/test/java/com/gitblit/tests/LuceneExecutorTest.java
index 0e1aee1e..4041a060 100644
--- a/src/test/java/com/gitblit/tests/LuceneExecutorTest.java
+++ b/src/test/java/com/gitblit/tests/LuceneExecutorTest.java
@@ -23,9 +23,11 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.gitblit.GitBlit;
import com.gitblit.Keys;
import com.gitblit.LuceneExecutor;
+import com.gitblit.manager.RepositoryManager;
+import com.gitblit.manager.RuntimeManager;
+import com.gitblit.manager.UserManager;
import com.gitblit.models.RefModel;
import com.gitblit.models.RepositoryModel;
import com.gitblit.models.SearchResult;
@@ -46,8 +48,10 @@ public class LuceneExecutorTest extends GitblitUnitTest {
private LuceneExecutor newLuceneExecutor() {
MemorySettings settings = new MemorySettings();
settings.put(Keys.git.repositoriesFolder, GitBlitSuite.REPOSITORIES);
- GitBlit gitblit = new GitBlit(settings, GitBlitSuite.REPOSITORIES);
- return new LuceneExecutor(settings, gitblit);
+ RuntimeManager runtime = new RuntimeManager(settings);
+ UserManager users = new UserManager(runtime);
+ RepositoryManager repos = new RepositoryManager(runtime, users);
+ return new LuceneExecutor(settings, repos);
}
private RepositoryModel newRepositoryModel(Repository repository) {
diff --git a/src/test/java/de/akquinet/devops/GitBlit4UITests.java b/src/test/java/de/akquinet/devops/GitBlit4UITests.java
deleted file mode 100644
index 9c559f88..00000000
--- a/src/test/java/de/akquinet/devops/GitBlit4UITests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package de.akquinet.devops;
-
-import java.util.concurrent.TimeUnit;
-
-import com.gitblit.GitBlit;
-
-public class GitBlit4UITests extends GitBlit {
-
- private boolean luceneIndexingEnabled;
-
- public GitBlit4UITests(boolean luceneIndexingEnabled) {
- super();
- this.luceneIndexingEnabled = luceneIndexingEnabled;
- }
-
- @Override
- protected void configureLuceneIndexing() {
- if (luceneIndexingEnabled) {
- getScheduledExecutor().scheduleAtFixedRate(getLuceneExecutor(), 1,
- 2, TimeUnit.MINUTES);
- getLogger()
- .info("Lucene executor is scheduled to process indexed branches every 2 minutes.");
- }
- }
-
-}