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

@@ -519,7 +519,7 @@
<value>admin</value> <value>admin</value>
</property> </property>
<property name="defaultAlfrescoRmiPort"> <property name="defaultAlfrescoRmiPort">
<value>50500</value> <value>${alfresco.rmi.services.port}</value>
</property> </property>
<property name="defaultReceiverRmiPort"> <property name="defaultReceiverRmiPort">
<value>44100</value> <value>44100</value>

View File

@@ -149,8 +149,14 @@ public class AVMServiceTestBase extends TestCase
} }
); );
} }
fService.createStore("main"); if (fService.getStore("main") == null)
fLockingService.addWebProject("main"); {
fService.createStore("main");
}
if (!fLockingService.getWebProjects().contains("main"))
{
fLockingService.addWebProject("main");
}
fStartTime = System.currentTimeMillis(); fStartTime = System.currentTimeMillis();
} }

View File

@@ -354,6 +354,14 @@
and an.isRoot = false and an.isRoot = false
]]> ]]>
</query> </query>
<query name="FindOrphans2">
<![CDATA[
select an
from ChildEntryImpl ce
right outer join ce.child an
where ce.child is null and an.isRoot = false
]]>
</query>
<query name="PlainFileNode.GetContentUrls"> <query name="PlainFileNode.GetContentUrls">
<![CDATA[ <![CDATA[
select select

View File

@@ -148,7 +148,7 @@ class AVMNodeDAOHibernate extends HibernateDaoSupport implements
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public List<AVMNode> getOrphans(int batchSize) public List<AVMNode> getOrphans(int batchSize)
{ {
Query query = getSession().getNamedQuery("FindOrphans"); Query query = getSession().getNamedQuery("FindOrphans2");
query.setMaxResults(batchSize); query.setMaxResults(batchSize);
return (List<AVMNode>)query.list(); return (List<AVMNode>)query.list();
} }

View File

@@ -77,5 +77,8 @@ public interface CopyServicePolicies
NodeRef destinationRef, NodeRef destinationRef,
boolean copyToNewNode, boolean copyToNewNode,
Map<NodeRef, NodeRef> copyMap); Map<NodeRef, NodeRef> copyMap);
static Arg ARG_0 = Arg.KEY;
static Arg ARG_1 = Arg.KEY;
} }
} }

View File

@@ -692,6 +692,34 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
assertEquals("Unexpected number of nodes present", 1, count); 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 * @see #ASPECT_QNAME_TEST_TITLED
*/ */