From f77adb953d48c65ecbf1753a50c28f31c54d4c6c Mon Sep 17 00:00:00 2001 From: Andrew Hind Date: Fri, 1 Jun 2007 09:37:12 +0000 Subject: [PATCH] Include avm recovery in the test git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5821 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../index/FullIndexRecoveryComponentTest.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/node/index/FullIndexRecoveryComponentTest.java b/source/java/org/alfresco/repo/node/index/FullIndexRecoveryComponentTest.java index 7ceb30dc15..0fba1c8e81 100644 --- a/source/java/org/alfresco/repo/node/index/FullIndexRecoveryComponentTest.java +++ b/source/java/org/alfresco/repo/node/index/FullIndexRecoveryComponentTest.java @@ -39,9 +39,13 @@ public class FullIndexRecoveryComponentTest extends TestCase private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext(); private FullIndexRecoveryComponent indexRecoverer; + + private AVMFullIndexRecoveryComponent avmIndexRecoveryComponent; public void setUp() throws Exception { indexRecoverer = (FullIndexRecoveryComponent) ctx.getBean("indexRecoveryComponent"); + avmIndexRecoveryComponent = (AVMFullIndexRecoveryComponent) ctx.getBean("avmIndexRecoveryComponent"); + } public void testSetup() throws Exception @@ -60,13 +64,23 @@ public class FullIndexRecoveryComponentTest extends TestCase indexRecoverer.reindex(); } }; + Thread avmReindexThread = new Thread() + { + public void run() + { + avmIndexRecoveryComponent.reindex(); + } + }; reindexThread.setDaemon(true); + avmReindexThread.setDaemon(true); reindexThread.start(); + avmReindexThread.start(); // reindexThread.run(); // wait a bit and then terminate - wait(10000); + wait(20000); indexRecoverer.setShutdown(true); - wait(10000); + avmIndexRecoveryComponent.setShutdown(true); + wait(20000); } }