Merged V2.2 to HEAD

8205: Benchmark fixes
   8212: AR-1663: OnCopyCompletePolicy is only being executed once per transaction, and not once per node being copied.
   8250: Test for long strings
   8251: Stopped chiba:match function from being generated into xforms constraints in XForms model bindings. see WCM-952.
   8260: AVMServiceTest is mostly repeatable without doing a clean bootstrap.
   8266: Andy Hind supplied replacement for query used in AVMNode GC.
   8267: Fix for AR-1909 - Updated Openoffice bootstrap for installer
   8270: Fix for WCM-1070
   8271: Fix for WCM-1007
   8284: AR-2069: WebService tickets are expired when upload and download sessions they have used are timed out
   8287: Fix for WCM-499


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8484 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-03-10 16:37:15 +00:00
parent a118105ed7
commit e35e582a95
6 changed files with 49 additions and 4 deletions

View File

@@ -692,6 +692,34 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
assertEquals("Unexpected number of nodes present", 1, count);
}
public void testLargeStrings() throws Exception
{
StringBuilder sb = new StringBuilder(2056);
for (int i = 0; i < 1024; i++)
{
sb.append("\u1234");
}
String longString = sb.toString();
int len = longString.length();
// Create a normal node
Map<QName, Serializable> properties = new HashMap<QName, Serializable>(5);
// fill properties
fillProperties(TYPE_QNAME_TEST_CONTENT, properties);
fillProperties(ASPECT_QNAME_TEST_TITLED, properties);
// create node for real
NodeRef nodeRef = nodeService.createNode(
rootNodeRef,
ASSOC_TYPE_QNAME_TEST_CHILDREN,
QName.createQName("MyContent"),
TYPE_QNAME_TEST_CONTENT,
properties).getChildRef();
// Modify name using the long string
nodeService.setProperty(nodeRef, ContentModel.PROP_NAME, longString);
}
/**
* @see #ASPECT_QNAME_TEST_TITLED
*/