Merged V3.4-BUG-FIX to HEAD

31676: ALF-8906: Fix IMAP unit test failures


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31677 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2011-11-03 10:47:23 +00:00
parent 9e738b2b69
commit b9034085db
5 changed files with 7 additions and 7 deletions

View File

@@ -205,7 +205,7 @@ public class ImapMessageTest extends TestCase
// Starting IMAP
imapServiceImpl.startupInTxn();
imapServiceImpl.startupInTxn(true);
nodeRefs = searchService.selectNodes(storeRootNodeRef, companyHomePathInStore + "/" + NamespaceService.CONTENT_MODEL_PREFIX + ":" + IMAP_FOLDER_NAME, null,
namespaceService, false);

View File

@@ -204,7 +204,7 @@ public class ImapServiceImpl implements ImapService, OnCreateChildAssociationPol
@Override
protected void onBootstrap(ApplicationEvent event)
{
service.startupInTxn();
service.startupInTxn(false);
}
@Override
@@ -431,9 +431,9 @@ public class ImapServiceImpl implements ImapService, OnCreateChildAssociationPol
{
}
protected void startupInTxn()
protected void startupInTxn(boolean force)
{
if (getImapServerEnabled())
if (force || getImapServerEnabled())
{
AuthenticationUtil.runAs(new RunAsWork<Void>()
{

View File

@@ -98,7 +98,7 @@ public class ImapServiceImplCacheTest extends TestCase
imapServiceImpl.setImapHome(imapHome);
// Starting IMAP
imapServiceImpl.startupInTxn();
imapServiceImpl.startupInTxn(true);
nodeRefs = searchService.selectNodes(storeRootNodeRef,
companyHomePathInStore + "/" + NamespaceService.CONTENT_MODEL_PREFIX + ":" + TEST_IMAP_FOLDER_NAME,

View File

@@ -180,7 +180,7 @@ public class ImapServiceImplTest extends TestCase
imapServiceImpl.setImapHome(imapHome);
// Starting IMAP
imapServiceImpl.startupInTxn();
imapServiceImpl.startupInTxn(true);
nodeRefs = searchService.selectNodes(storeRootNodeRef,
companyHomePathInStore + "/" + NamespaceService.CONTENT_MODEL_PREFIX + ":" + TEST_IMAP_FOLDER_NAME,

View File

@@ -163,7 +163,7 @@ public class LoadTester extends TestCase
imapServiceImpl.setImapHome(imapHome);
// Starting IMAP
imapServiceImpl.startupInTxn();
imapServiceImpl.startupInTxn(true);
nodeRefs = searchService.selectNodes(storeRootNodeRef,
companyHomePathInStore + "/" + NamespaceService.CONTENT_MODEL_PREFIX + ":" + TEST_IMAP_ROOT_FOLDER_NAME,