Fix/repo 2783 node service test test concurrent archive failing (#80)

* REPO-2783: NodeServiceTest testConcurrentArchive is failing
   Increse size of nodesPrimer from 1 to 2 for NodesServiceTests.testConcurrentArchive(), which fix the failing on a clean db, because of missing namespace.
   Remove comment regarding REPO-2783 in MiscContextTestSuite
   Increase size of nodesOne[] from 10 to 15 because when mysql deadlocks it rollbacks the transaction using less data.
   Added link of REPO-2783 to javadoc NodeServiceTest.testConcurrentArchive()
This commit is contained in:
Alexandru-Eusebiu Epure
2018-02-20 14:37:36 +02:00
committed by GitHub
parent ce7fd34f0d
commit c3fb783edf
2 changed files with 5 additions and 6 deletions

View File

@@ -97,7 +97,6 @@ import org.springframework.context.ApplicationContext;
// [classpath*:alfresco/ibatis/ibatis-test-context.xml, classpath:alfresco/application-context.xml, // [classpath*:alfresco/ibatis/ibatis-test-context.xml, classpath:alfresco/application-context.xml,
// classpath:alfresco/test/global-integration-test-context.xml] // classpath:alfresco/test/global-integration-test-context.xml]
org.alfresco.repo.domain.query.CannedQueryDAOTest.class, org.alfresco.repo.domain.query.CannedQueryDAOTest.class,
// REPO-2783 only passes on a dirty DB. fails to pass on a clean DB - testConcurrentArchive
org.alfresco.repo.node.NodeServiceTest.class, org.alfresco.repo.node.NodeServiceTest.class,
// [classpath:alfresco/application-context.xml, classpath:alfresco/minimal-context.xml] // [classpath:alfresco/application-context.xml, classpath:alfresco/minimal-context.xml]

View File

@@ -113,6 +113,7 @@ import org.springframework.extensions.surf.util.I18NUtil;
* @author Derek Hulley * @author Derek Hulley
* @since 4.0 * @since 4.0
*/ */
@Category(OwnJVMTestsCategory.class) @Category(OwnJVMTestsCategory.class)
public class NodeServiceTest public class NodeServiceTest
{ {
@@ -391,10 +392,9 @@ public class NodeServiceTest
* <p/> * <p/>
* See: <a href="https://issues.alfresco.com/jira/browse/ALF-5714">ALF-5714</a><br/> * See: <a href="https://issues.alfresco.com/jira/browse/ALF-5714">ALF-5714</a><br/>
* See: <a href="https://issues.alfresco.com/jira/browse/ALF-16888">ALF-16888</a> * See: <a href="https://issues.alfresco.com/jira/browse/ALF-16888">ALF-16888</a>
* See: <a href="https://issues.alfresco.com/jira/browse/REPO-2783">REPO-2783</a>
* <p/> * <p/>
* Note: if this test hangs for MySQL then check if 'innodb_locks_unsafe_for_binlog = true' (and restart MySQL + test) * Note: if this test hangs for MySQL then check if 'innodb_locks_unsafe_for_binlog = true' (and restart MySQL + test)
*
* TODO add @Test marker back to the test after REPO-2783 is fixed
*/ */
public void testConcurrentArchive() throws Exception public void testConcurrentArchive() throws Exception
{ {
@@ -406,9 +406,9 @@ public class NodeServiceTest
} }
final NodeRef workspaceRootNodeRef = nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE); final NodeRef workspaceRootNodeRef = nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
final NodeRef[] nodesPrimer = new NodeRef[1]; final NodeRef[] nodesPrimer = new NodeRef[2];
buildNodeHierarchy(workspaceRootNodeRef, nodesPrimer); buildNodeHierarchy(workspaceRootNodeRef, nodesPrimer);
final NodeRef[] nodesOne = new NodeRef[10]; final NodeRef[] nodesOne = new NodeRef[15];
buildNodeHierarchy(workspaceRootNodeRef, nodesOne); buildNodeHierarchy(workspaceRootNodeRef, nodesOne);
final NodeRef[] nodesTwo = new NodeRef[10]; final NodeRef[] nodesTwo = new NodeRef[10];
buildNodeHierarchy(workspaceRootNodeRef, nodesTwo); buildNodeHierarchy(workspaceRootNodeRef, nodesTwo);