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:
Andrew Hind
2010-04-21 11:44:00 +00:00
parent 8a3a6ed4f9
commit 65695eda66
2 changed files with 12 additions and 4 deletions

View File

@@ -326,7 +326,10 @@ public class FullIndexRecoveryComponent extends AbstractReindexComponent
// delete stores
for(StoreRef storeRef : nodeService.getStores())
{
indexer.deleteIndex(storeRef);
if(!storeRef.getProtocol().equals(StoreRef.PROTOCOL_AVM))
{
indexer.deleteIndex(storeRef);
}
}
return null;
}

View File

@@ -161,6 +161,7 @@ public class FullIndexRecoveryComponentTest extends TestCase
public synchronized void testReindexing() throws Exception
{
indexRecoverer.setRecoveryMode(FullIndexRecoveryComponent.RecoveryMode.FULL.name());
avmIndexRecoveryComponent.setRecoveryMode(FullIndexRecoveryComponent.RecoveryMode.FULL.name());
// reindex
Thread reindexThread = new Thread()
{
@@ -176,11 +177,15 @@ public class FullIndexRecoveryComponentTest extends TestCase
avmIndexRecoveryComponent.reindex();
}
};
reindexThread.setDaemon(true);
avmReindexThread.setDaemon(true);
//reindexThread.setDaemon(true);
//avmReindexThread.setDaemon(true);
reindexThread.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(20000);