mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Build fix: Full index recovery test now recovers all indexes (we now delete the indexes on FULL rebuild which means subsequent test will fail to validate)
- DM index ignores AVM stores - AVM stores are also rebuilt in the test git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19930 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -326,7 +326,10 @@ public class FullIndexRecoveryComponent extends AbstractReindexComponent
|
|||||||
// delete stores
|
// delete stores
|
||||||
for(StoreRef storeRef : nodeService.getStores())
|
for(StoreRef storeRef : nodeService.getStores())
|
||||||
{
|
{
|
||||||
indexer.deleteIndex(storeRef);
|
if(!storeRef.getProtocol().equals(StoreRef.PROTOCOL_AVM))
|
||||||
|
{
|
||||||
|
indexer.deleteIndex(storeRef);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@@ -161,6 +161,7 @@ public class FullIndexRecoveryComponentTest extends TestCase
|
|||||||
public synchronized void testReindexing() throws Exception
|
public synchronized void testReindexing() throws Exception
|
||||||
{
|
{
|
||||||
indexRecoverer.setRecoveryMode(FullIndexRecoveryComponent.RecoveryMode.FULL.name());
|
indexRecoverer.setRecoveryMode(FullIndexRecoveryComponent.RecoveryMode.FULL.name());
|
||||||
|
avmIndexRecoveryComponent.setRecoveryMode(FullIndexRecoveryComponent.RecoveryMode.FULL.name());
|
||||||
// reindex
|
// reindex
|
||||||
Thread reindexThread = new Thread()
|
Thread reindexThread = new Thread()
|
||||||
{
|
{
|
||||||
@@ -176,11 +177,15 @@ public class FullIndexRecoveryComponentTest extends TestCase
|
|||||||
avmIndexRecoveryComponent.reindex();
|
avmIndexRecoveryComponent.reindex();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
reindexThread.setDaemon(true);
|
//reindexThread.setDaemon(true);
|
||||||
avmReindexThread.setDaemon(true);
|
//avmReindexThread.setDaemon(true);
|
||||||
reindexThread.start();
|
reindexThread.start();
|
||||||
avmReindexThread.start();
|
avmReindexThread.start();
|
||||||
// reindexThread.run();
|
|
||||||
|
// must allow the rebuild to complete or the test after this one will fail to validate their indexes
|
||||||
|
// - as they now will be deleted.
|
||||||
|
reindexThread.join();
|
||||||
|
avmReindexThread.join();
|
||||||
|
|
||||||
// wait a bit and then terminate
|
// wait a bit and then terminate
|
||||||
wait(20000);
|
wait(20000);
|
||||||
|
Reference in New Issue
Block a user