Merged V4.1-BUG-FIX to HEAD

43196: Merged DEV to V4.1-BUG-FIX
      39849: ALF-13301: The value of bpm_reassignable is not converted by JBPM to boolean when we use timer.
      Flush session before closing JbpmContext.
   43199: Temp fix for:     ALF-16558 SOLR tracking does not do incremental updates but one single chunk
   43201: Fixed ALF-11457 "Send email to user rule can't be created if the User name starts with number"
   43210: Fixed ALF-16317 "Labels not displaying full text when creating a rule on a folder with IE8"
   43219: Merged DEV to V4.1-BUG-FIX
      43213: ALF-13277: CLONE - IMAP: User home space is opened when browsing through Content Folder URL
      org.alfresco.repo.model.filefolder.FileFolderServiceImpl.getNamePath(NodeRef, NodeRef) method was updated with fix that return an empty list if the root node path is requested.
   43226: ALF-15755: Merged DEV to V4.1-BUG-FIX (modified)
      43088:  If the WebDAV path of a document exceeds 255 characters, documents opened in MSOffice cannot be saved back
         1. parseRequestHeaders() method was overrode in AbstractMoveOrCopyMethod class.
         2. unlockNodeIfLocked() method was added In MoveMethod.
   43232: Fix for ALF-16254 - 'Leave Site' behaviour for group based site membership
   43236: Fix for ALF-15236 - JSF - Edit online of html files does not keep the formatting
   43239: Removed tabs
   43251: ALF-16419: Content uploaded through webdav in win7 adds a write lock, resulting in rules not triggering
   - Use LockUtils.isLockedAndReadOnly in ActionExecuterAbstractBase
   43310: Fix for ALF-16469 ***  Solr Indexing - Index for 5M docs, 2M txns, 2TB content, 50k users, 10k groups grows up to 300GB with FTS disabled. Is it expected?
   - first pass at reducing stored fields in the SOLR index - PATH and secondary parent info
   43314: ALF-16575 - Email server does not accept email where Subject ends with a period
   43357: ALF-16573: LDAP synchronization fails when a child group has more than one parent
   - Because AbstractNodeDAOImpl was wrongly recognizing a deadlock as a DuplicateChildNodeNameException
   - Now it correctly recognizes the PostgreSQL "40P01" SQLSTATE
   43359: Merged DEV to V4.1-BUG-FIX
      43338: ALF-16515: Error 403 when authenticating against an Active Directory
      Transaction type for login Web script has been modified to 'readwrite' to introduce a possibility creating missing people in the context of the regular '/api/login' 'LoginBean'. This is necessary for some authentication mechanisms. For example, for Kerberos authentication without SSO


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@43362 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2012-11-03 12:58:27 +00:00
parent fddbe192c7
commit 973a12155c
9 changed files with 256 additions and 152 deletions

View File

@@ -369,8 +369,11 @@ public class EmailServiceImplTest extends TestCase
/**
* ALF-9544
* ALF-751
*
* Inbound email to a folder restricts file name to 86 characters or less.
*
* Also has tests for other variations of subject
*/
public void testFolderSubject() throws Exception
{
@@ -490,6 +493,102 @@ public class EmailServiceImplTest extends TestCase
emailService.importMessage(delivery, m);
}
// ALF-751 Email ends with period
{
Session sess = Session.getDefaultInstance(new Properties());
assertNotNull("sess is null", sess);
SMTPMessage msg = new SMTPMessage(sess);
InternetAddress[] toa = { new InternetAddress(to) };
msg.setFrom(new InternetAddress(TEST_EMAIL));
msg.setRecipients(Message.RecipientType.TO, toa);
msg.setSubject("Foobar.");
msg.setContent(content, "text/plain");
StringBuffer sb = new StringBuffer();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
msg.writeTo(bos);
InputStream is = new StringInputStream(bos.toString());
assertNotNull("is is null", is);
SubethaEmailMessage m = new SubethaEmailMessage(is);
EmailDelivery delivery = new EmailDelivery(to, from, null);
emailService.importMessage(delivery, m);
}
// ALF-751 Email ends with ...
{
Session sess = Session.getDefaultInstance(new Properties());
assertNotNull("sess is null", sess);
SMTPMessage msg = new SMTPMessage(sess);
InternetAddress[] toa = { new InternetAddress(to) };
msg.setFrom(new InternetAddress(TEST_EMAIL));
msg.setRecipients(Message.RecipientType.TO, toa);
msg.setSubject("Foobar...");
msg.setContent(content, "text/plain");
StringBuffer sb = new StringBuffer();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
msg.writeTo(bos);
InputStream is = new StringInputStream(bos.toString());
assertNotNull("is is null", is);
SubethaEmailMessage m = new SubethaEmailMessage(is);
EmailDelivery delivery = new EmailDelivery(to, from, null);
emailService.importMessage(delivery, m);
}
// ALF-751 Email subject is blank " ... "
{
Session sess = Session.getDefaultInstance(new Properties());
assertNotNull("sess is null", sess);
SMTPMessage msg = new SMTPMessage(sess);
InternetAddress[] toa = { new InternetAddress(to) };
msg.setFrom(new InternetAddress(TEST_EMAIL));
msg.setRecipients(Message.RecipientType.TO, toa);
msg.setSubject(" ... ");
msg.setContent(content, "text/plain");
StringBuffer sb = new StringBuffer();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
msg.writeTo(bos);
InputStream is = new StringInputStream(bos.toString());
assertNotNull("is is null", is);
SubethaEmailMessage m = new SubethaEmailMessage(is);
EmailDelivery delivery = new EmailDelivery(to, from, null);
emailService.importMessage(delivery, m);
}
// ALF-751 Email subject is a single .
{
Session sess = Session.getDefaultInstance(new Properties());
assertNotNull("sess is null", sess);
SMTPMessage msg = new SMTPMessage(sess);
InternetAddress[] toa = { new InternetAddress(to) };
msg.setFrom(new InternetAddress(TEST_EMAIL));
msg.setRecipients(Message.RecipientType.TO, toa);
msg.setSubject(".");
msg.setContent(content, "text/plain");
StringBuffer sb = new StringBuffer();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
msg.writeTo(bos);
InputStream is = new StringInputStream(bos.toString());
assertNotNull("is is null", is);
SubethaEmailMessage m = new SubethaEmailMessage(is);
EmailDelivery delivery = new EmailDelivery(to, from, null);
emailService.importMessage(delivery, m);
}
}