mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-16 17:55:15 +00:00
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
This commit is contained in:
parent
8e38ff8253
commit
f77adb953d
@ -39,9 +39,13 @@ public class FullIndexRecoveryComponentTest extends TestCase
|
|||||||
private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
|
private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
|
||||||
|
|
||||||
private FullIndexRecoveryComponent indexRecoverer;
|
private FullIndexRecoveryComponent indexRecoverer;
|
||||||
|
|
||||||
|
private AVMFullIndexRecoveryComponent avmIndexRecoveryComponent;
|
||||||
public void setUp() throws Exception
|
public void setUp() throws Exception
|
||||||
{
|
{
|
||||||
indexRecoverer = (FullIndexRecoveryComponent) ctx.getBean("indexRecoveryComponent");
|
indexRecoverer = (FullIndexRecoveryComponent) ctx.getBean("indexRecoveryComponent");
|
||||||
|
avmIndexRecoveryComponent = (AVMFullIndexRecoveryComponent) ctx.getBean("avmIndexRecoveryComponent");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSetup() throws Exception
|
public void testSetup() throws Exception
|
||||||
@ -60,13 +64,23 @@ public class FullIndexRecoveryComponentTest extends TestCase
|
|||||||
indexRecoverer.reindex();
|
indexRecoverer.reindex();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Thread avmReindexThread = new Thread()
|
||||||
|
{
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
avmIndexRecoveryComponent.reindex();
|
||||||
|
}
|
||||||
|
};
|
||||||
reindexThread.setDaemon(true);
|
reindexThread.setDaemon(true);
|
||||||
|
avmReindexThread.setDaemon(true);
|
||||||
reindexThread.start();
|
reindexThread.start();
|
||||||
|
avmReindexThread.start();
|
||||||
// reindexThread.run();
|
// reindexThread.run();
|
||||||
|
|
||||||
// wait a bit and then terminate
|
// wait a bit and then terminate
|
||||||
wait(10000);
|
wait(20000);
|
||||||
indexRecoverer.setShutdown(true);
|
indexRecoverer.setShutdown(true);
|
||||||
wait(10000);
|
avmIndexRecoveryComponent.setShutdown(true);
|
||||||
|
wait(20000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user