diff options
author | Florian Zschocke <florian.zschocke@devolo.de> | 2017-03-05 20:12:48 +0100 |
---|---|---|
committer | Florian Zschocke <florian.zschocke@devolo.de> | 2017-03-05 20:27:40 +0100 |
commit | 63dbdfda13daa78a26f1c2e77b0a4bfd5a35df8d (patch) | |
tree | 683607a1e3dab5d29e18b77d0c4705632b74e117 /src/test | |
parent | 197ddd27c8a6d304c9ba20e8ef9af9daef5f3083 (diff) | |
download | gitblit-63dbdfda13daa78a26f1c2e77b0a4bfd5a35df8d.tar.gz gitblit-63dbdfda13daa78a26f1c2e77b0a4bfd5a35df8d.zip |
Reindex tickets on server start if no index exists
Check if tickets need to be reindexed when the server starts. This is the
case if no ticket index exists. In that case the ticket index is built.
This is done during the start of the `ITicketService`.
For this the interface of `ITicketService` needed to change. The `start`
method was defined abstract and the specific ticket services had to
implement it. None does any real starting stuff in it.
The `start` method is now final. It calls a new abstract method `onStart`
which the specific ticket services need to implement. In the existing
implementations I just changed `start` to `onStart`.
Diffstat (limited to 'src/test')
4 files changed, 4 insertions, 4 deletions
diff --git a/src/test/java/com/gitblit/tests/BranchTicketServiceTest.java b/src/test/java/com/gitblit/tests/BranchTicketServiceTest.java index 0a5de196..0e9d8874 100644 --- a/src/test/java/com/gitblit/tests/BranchTicketServiceTest.java +++ b/src/test/java/com/gitblit/tests/BranchTicketServiceTest.java @@ -59,7 +59,7 @@ public class BranchTicketServiceTest extends TicketServiceTest { IUserManager userManager = new UserManager(runtimeManager, pluginManager).start(); IRepositoryManager repositoryManager = new RepositoryManager(runtimeManager, pluginManager, userManager).start(); - BranchTicketService service = new BranchTicketService( + BranchTicketService service = (BranchTicketService) new BranchTicketService( runtimeManager, pluginManager, notificationManager, diff --git a/src/test/java/com/gitblit/tests/FileTicketServiceTest.java b/src/test/java/com/gitblit/tests/FileTicketServiceTest.java index 1fb2eed9..c4a63c41 100644 --- a/src/test/java/com/gitblit/tests/FileTicketServiceTest.java +++ b/src/test/java/com/gitblit/tests/FileTicketServiceTest.java @@ -58,7 +58,7 @@ public class FileTicketServiceTest extends TicketServiceTest { IUserManager userManager = new UserManager(runtimeManager, pluginManager).start(); IRepositoryManager repositoryManager = new RepositoryManager(runtimeManager, pluginManager, userManager).start(); - FileTicketService service = new FileTicketService( + FileTicketService service = (FileTicketService) new FileTicketService( runtimeManager, pluginManager, notificationManager, diff --git a/src/test/java/com/gitblit/tests/RedisTicketServiceTest.java b/src/test/java/com/gitblit/tests/RedisTicketServiceTest.java index 48011ade..5f3cb94f 100644 --- a/src/test/java/com/gitblit/tests/RedisTicketServiceTest.java +++ b/src/test/java/com/gitblit/tests/RedisTicketServiceTest.java @@ -66,7 +66,7 @@ public class RedisTicketServiceTest extends TicketServiceTest { IUserManager userManager = new UserManager(runtimeManager, pluginManager).start(); IRepositoryManager repositoryManager = new RepositoryManager(runtimeManager, pluginManager, userManager).start(); - RedisTicketService service = new RedisTicketService( + RedisTicketService service = (RedisTicketService) new RedisTicketService( runtimeManager, pluginManager, notificationManager, diff --git a/src/test/java/com/gitblit/tests/UITicketTest.java b/src/test/java/com/gitblit/tests/UITicketTest.java index 54aa1e1e..e89c32fc 100644 --- a/src/test/java/com/gitblit/tests/UITicketTest.java +++ b/src/test/java/com/gitblit/tests/UITicketTest.java @@ -83,7 +83,7 @@ public class UITicketTest extends GitblitUnitTest { IUserManager userManager = new UserManager(runtimeManager, pluginManager).start(); IRepositoryManager repositoryManager = new RepositoryManager(runtimeManager, pluginManager, userManager).start(); - BranchTicketService service = new BranchTicketService( + BranchTicketService service = (BranchTicketService) new BranchTicketService( runtimeManager, pluginManager, notificationManager, |