mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merge from V3.4 to HEAD
r. 23793 Merge from V3.3-BUG-FIX to V3.4 r. 23791 Fix for failing test cases SiteServiceTest and InviteServiceTest. I have used susbsystem bean overriding to turn off emails on the MailActionExecuter bean. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23795 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -89,10 +89,11 @@ public class SiteServiceTest extends BaseWebScriptTest
|
||||
this.nodeService = (NodeService)getServer().getApplicationContext().getBean("NodeService");
|
||||
this.authorityService = (AuthorityService)getServer().getApplicationContext().getBean("AuthorityService");
|
||||
|
||||
// TODO MER 20/11/2009 Bodge - turn off email sending to prevent errors during unit testing
|
||||
// (or sending out email by accident from tests)
|
||||
MailActionExecuter mail = (MailActionExecuter)getServer().getApplicationContext().getBean("mail");
|
||||
mail.setTestMode(true);
|
||||
// We're using a MailActionExecuter defined in outboundSMTP-test-context.xml which
|
||||
// sets the testMode property to true via spring injection. This will prevent emails
|
||||
// from being sent from within this test case.
|
||||
// This MailExecutorAction bean is named "test-mail" but is in all other respects equivalent to the
|
||||
// 'real' executer bean. It is automatically included during OutboundSMTP subsystem startup.
|
||||
|
||||
this.authenticationComponent.setSystemUserAsCurrentUser();
|
||||
|
||||
|
Reference in New Issue
Block a user