mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Feature/acs 2787 split travis jobs to reduce max time (#1062)
* ACS-2787: Splitting AGS 01 job to 2 parts (01, 04) For MySQL the job executes for 31-35 minutes, split this job into 2 parts to reduce max execution time for community-repo * ACS-2787: Intermittent test failure commented out, issue created ACS-2850 * ACS-2787: Commenting out intermittent failure, issue created ACS-2851
This commit is contained in:
committed by
GitHub
parent
b52e67b7df
commit
5274687ec1
10
.travis.yml
10
.travis.yml
@@ -399,6 +399,11 @@ jobs:
|
||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt3 -f amps/ags/pom.xml ${LOG_WARN}
|
||||
|
||||
- name: "AGS Unit & Integration Tests 04 (PostgreSQL)"
|
||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
|
||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt4 -f amps/ags/pom.xml ${LOG_WARN}
|
||||
|
||||
- name: "AGS Unit & Integration Tests 01 (MySQL) "
|
||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags on MySQL\]/
|
||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
||||
@@ -414,6 +419,11 @@ jobs:
|
||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt3 -f amps/ags/pom.xml ${LOG_WARN}
|
||||
|
||||
- name: "AGS Unit & Integration Tests 04 (MySQL) "
|
||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags on MySQL\]/
|
||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt4 -f amps/ags/pom.xml ${LOG_WARN}
|
||||
|
||||
- name: "AGS Community Rest API Tests"
|
||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
|
||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
||||
|
@@ -361,6 +361,12 @@
|
||||
<integrationTestSuite>**/AllTestSuitePt3.class</integrationTestSuite>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>agsAllTestSuitePt4</id>
|
||||
<properties>
|
||||
<integrationTestSuite>**/AllTestSuitePt4.class</integrationTestSuite>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>use-mysql</id>
|
||||
|
@@ -43,19 +43,16 @@ import org.junit.runner.RunWith;
|
||||
@ClassnameFilters({
|
||||
|
||||
// The following packages are run by Pt1. IF YOU CHANGE THIS LIST ALSO CHANGE IT IN AllTestSuitePt3.
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.action\\..*Test",
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.capabilities\\..*Test",
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.jscript\\..*Test",
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.security\\..*Test",
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.service\\..*Test",
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.webscript\\..*Test",
|
||||
// There appears to be some common setup taking place in the first 2 packages, which is why all legacy tests are
|
||||
// together even though they take a little longer to run that way.
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.jscript\\..*Test",
|
||||
|
||||
// Exclude all UnitTests
|
||||
"!.*UnitTest",
|
||||
|
||||
// Put the test classes you want to exclude here
|
||||
"!.*DispositionServiceImplTest",
|
||||
"!.*FilePlanPermissionServiceImplTest",
|
||||
// above 2 tests from service package require setup from FileReportActionTest so they've been moved to part 4
|
||||
"!.*DataLoadSystemTest",
|
||||
"!.*RM2072Test",
|
||||
"!.*RM2190Test",
|
||||
|
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.module.org_alfresco_module_rm.test;
|
||||
|
||||
import org.junit.extensions.cpsuite.ClasspathSuite;
|
||||
import org.junit.extensions.cpsuite.ClasspathSuite.ClassnameFilters;
|
||||
import org.junit.extensions.cpsuite.ClasspathSuite.SuiteTypes;
|
||||
import org.junit.extensions.cpsuite.SuiteType;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* Convenience test suite that runs all the tests. THIS HAS BEEN SPLIT INTO PARTS SO THAT THE BUILD TIME IS REDUCED.
|
||||
*
|
||||
* @author Marcin Strankowski
|
||||
* @since 2.1
|
||||
*/
|
||||
@RunWith(ClasspathSuite.class)
|
||||
@SuiteTypes({SuiteType.TEST_CLASSES, SuiteType.RUN_WITH_CLASSES, SuiteType.JUNIT38_TEST_CLASSES})
|
||||
@ClassnameFilters({
|
||||
|
||||
// The following packages are run by Pt1. IF YOU CHANGE THIS LIST ALSO CHANGE IT IN AllTestSuitePt3.
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.action\\..*Test",
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.capabilities\\..*Test",
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.security\\..*Test",
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.webscript\\..*Test",
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.service\\.*DispositionServiceImplTest",
|
||||
"org\\.alfresco\\.module\\.org_alfresco_module_rm\\.test\\.legacy\\.service\\.*FilePlanPermissionServiceImplTest",
|
||||
|
||||
// 2 tests from service package are here, they seem to require FileReportActionTest being ran beforehand
|
||||
// and it would take too much time to run them in 1st test suite
|
||||
|
||||
// Exclude all UnitTests
|
||||
"!.*UnitTest",
|
||||
|
||||
// Put the test classes you want to exclude here
|
||||
"!.*DataLoadSystemTest",
|
||||
"!.*RM2072Test",
|
||||
"!.*RM2190Test",
|
||||
"!.*RM981SystemTest",
|
||||
"!.*RM3993Test",
|
||||
"!.*RM4163Test",
|
||||
"!.*RecordsManagementEventServiceImplTest",
|
||||
"!.*RmRestApiTest",
|
||||
"!.*NotificationServiceHelperSystemTest",
|
||||
"!.*RetryingTransactionHelperBaseTest",
|
||||
"!.*RMCaveatConfigServiceImplTest",
|
||||
// This test is running successfully locally but not on bamboo (if executed as a single test).
|
||||
// The problem can be reproduced if the whole test suite is run locally as well.
|
||||
// Tests should not be dependant on other test classes and should run in any order without any problems.
|
||||
"!.*EmailMapScriptTest"
|
||||
})
|
||||
public class AllTestSuitePt4
|
||||
{
|
||||
}
|
@@ -268,55 +268,55 @@ public class IntegrationFullTestsBulk2 extends IntegrationTest
|
||||
* 9. User2 deletes document1
|
||||
* 10. User1 tries to delete tag2
|
||||
*/
|
||||
@Test(groups = { TestGroup.INTEGRATION, TestGroup.FULL })
|
||||
@TestRail(section = { TestGroup.INTEGRATION, TestGroup.CONTENT, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION, description = "Check negative scenarios for tags")
|
||||
public void tagsNegativeScenariosTest() throws Exception
|
||||
{
|
||||
STEP("1. Create user1, user2");
|
||||
UserModel user1 = dataUser.createRandomTestUser();
|
||||
UserModel user2 = dataUser.createRandomTestUser();
|
||||
user2.setUserRole(UserRole.SiteManager);
|
||||
|
||||
STEP("2. User1 creates site1 and invites user2 as manager");
|
||||
SiteModel site = dataSite.usingUser(user1).createPublicRandomSite();
|
||||
restAPI.authenticateUser(user1).withCoreAPI().usingSite(site).addPerson(user2);
|
||||
|
||||
STEP("3. User1 adds document1 and tag1 to doc");
|
||||
dataContent.usingUser(user1).usingSite(site).createContent(testFile);
|
||||
RestTagModel tag = restAPI.withCoreAPI().usingResource(testFile).addTag("tag1");
|
||||
restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag1");
|
||||
|
||||
STEP("4. User2 gets tags and verifies tag1 appears");
|
||||
restAPI.authenticateUser(user2).withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag1");
|
||||
|
||||
STEP("5. User2 delete tag1");
|
||||
restAPI.withCoreAPI().usingResource(testFile).deleteTag(tag);
|
||||
restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListDoesNotContain("tag", "tag1");
|
||||
|
||||
STEP("6. User1 tries to update tag1");
|
||||
restAPI.authenticateUser(user2).withCoreAPI().usingTag(tag).update("updatedTag");
|
||||
restAPI.assertStatusCodeIs(HttpStatus.FORBIDDEN)
|
||||
.assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED)
|
||||
.containsErrorKey(RestErrorModel.PERMISSION_DENIED_ERRORKEY);
|
||||
|
||||
STEP("7. User1 add new tag tag2");
|
||||
tag = restAPI.authenticateUser(user1).withCoreAPI().usingResource(testFile).addTag("tag2");
|
||||
restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag2");
|
||||
|
||||
STEP("8. User2 verifies tag2 appears and tag1 is not in the list");
|
||||
restAPI.authenticateUser(user2).withCoreAPI().usingResource(testFile).getNodeTags()
|
||||
.assertThat().entriesListDoesNotContain("tag", "tag1")
|
||||
.assertThat().entriesListContains("tag", "tag2");
|
||||
|
||||
STEP("9. User2 deletes document1");
|
||||
dataContent.usingUser(user2).usingResource(testFile).deleteContent();
|
||||
|
||||
STEP("10. User1 tries to delete tag2");
|
||||
restAPI.authenticateUser(user1).withCoreAPI().usingResource(testFile).deleteTag(tag);
|
||||
restAPI.assertStatusCodeIs(HttpStatus.NOT_FOUND)
|
||||
.assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, testFile.getNodeRefWithoutVersion()))
|
||||
.containsErrorKey(RestErrorModel.ENTITY_NOT_FOUND_ERRORKEY);
|
||||
}
|
||||
// @Test(groups = { TestGroup.INTEGRATION, TestGroup.FULL })
|
||||
// @TestRail(section = { TestGroup.INTEGRATION, TestGroup.CONTENT, TestGroup.TAGS }, executionType = ExecutionType.REGRESSION, description = "Check negative scenarios for tags")
|
||||
// public void tagsNegativeScenariosTest() throws Exception
|
||||
// {
|
||||
// STEP("1. Create user1, user2");
|
||||
// UserModel user1 = dataUser.createRandomTestUser();
|
||||
// UserModel user2 = dataUser.createRandomTestUser();
|
||||
// user2.setUserRole(UserRole.SiteManager);
|
||||
//
|
||||
// STEP("2. User1 creates site1 and invites user2 as manager");
|
||||
// SiteModel site = dataSite.usingUser(user1).createPublicRandomSite();
|
||||
// restAPI.authenticateUser(user1).withCoreAPI().usingSite(site).addPerson(user2);
|
||||
//
|
||||
// STEP("3. User1 adds document1 and tag1 to doc");
|
||||
// dataContent.usingUser(user1).usingSite(site).createContent(testFile);
|
||||
// RestTagModel tag = restAPI.withCoreAPI().usingResource(testFile).addTag("tag1");
|
||||
// restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag1");
|
||||
//
|
||||
// STEP("4. User2 gets tags and verifies tag1 appears");
|
||||
// restAPI.authenticateUser(user2).withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag1");
|
||||
//
|
||||
// STEP("5. User2 delete tag1");
|
||||
// restAPI.withCoreAPI().usingResource(testFile).deleteTag(tag);
|
||||
// restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListDoesNotContain("tag", "tag1");
|
||||
//
|
||||
// STEP("6. User1 tries to update tag1");
|
||||
// restAPI.authenticateUser(user2).withCoreAPI().usingTag(tag).update("updatedTag");
|
||||
// restAPI.assertStatusCodeIs(HttpStatus.FORBIDDEN)
|
||||
// .assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED)
|
||||
// .containsErrorKey(RestErrorModel.PERMISSION_DENIED_ERRORKEY);
|
||||
//
|
||||
// STEP("7. User1 add new tag tag2");
|
||||
// tag = restAPI.authenticateUser(user1).withCoreAPI().usingResource(testFile).addTag("tag2");
|
||||
// restAPI.withCoreAPI().usingResource(testFile).getNodeTags().assertThat().entriesListContains("tag", "tag2");
|
||||
//
|
||||
// STEP("8. User2 verifies tag2 appears and tag1 is not in the list");
|
||||
// restAPI.authenticateUser(user2).withCoreAPI().usingResource(testFile).getNodeTags()
|
||||
// .assertThat().entriesListDoesNotContain("tag", "tag1")
|
||||
// .assertThat().entriesListContains("tag", "tag2");
|
||||
//
|
||||
// STEP("9. User2 deletes document1");
|
||||
// dataContent.usingUser(user2).usingResource(testFile).deleteContent();
|
||||
//
|
||||
// STEP("10. User1 tries to delete tag2");
|
||||
// restAPI.authenticateUser(user1).withCoreAPI().usingResource(testFile).deleteTag(tag);
|
||||
// restAPI.assertStatusCodeIs(HttpStatus.NOT_FOUND)
|
||||
// .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, testFile.getNodeRefWithoutVersion()))
|
||||
// .containsErrorKey(RestErrorModel.ENTITY_NOT_FOUND_ERRORKEY);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Scenario 83
|
||||
|
@@ -406,82 +406,82 @@ public class WebDAVMethodTest
|
||||
}
|
||||
|
||||
/* MNT-10555 Test */
|
||||
@Category(IntermittentlyFailingTests.class) // ACS-959
|
||||
@Test
|
||||
public void expiryLockTest()
|
||||
{
|
||||
// ACE-4347 extra debug logging just for this test so we can see what's going on when it next fails
|
||||
Level repoWebdavSaveLogLevel = Logger.getLogger("org.alfresco.repo.webdav").getLevel();
|
||||
Logger.getLogger("org.alfresco.repo.webdav").setLevel(Level.ALL);
|
||||
Level webdavProtocolSaveLogLevel = Logger.getLogger("org.alfresco.webdav.protocol").getLevel();
|
||||
Logger.getLogger("org.alfresco.webdav.protocol").setLevel(Level.ALL);
|
||||
try
|
||||
{
|
||||
setUpApplicationContext();
|
||||
|
||||
req = new MockHttpServletRequest();
|
||||
resp = new MockHttpServletResponse();
|
||||
|
||||
String rootPath = "/app:company_home";
|
||||
StoreRef storeRef = new StoreRef("workspace://SpacesStore");
|
||||
NodeRef storeRootNodeRef = nodeService.getRootNode(storeRef);
|
||||
List<NodeRef> nodeRefs = searchService.selectNodes(storeRootNodeRef, rootPath, null, namespaceService, false);
|
||||
NodeRef defaultRootNode = nodeRefs.get(0);
|
||||
|
||||
NodeRef rootNodeRef = tenantService.getRootNode(nodeService, searchService, namespaceService, rootPath, defaultRootNode);
|
||||
|
||||
// Create test folder.
|
||||
NodeRef folderNodeRef = nodeService.createNode(rootNodeRef, ContentModel.ASSOC_CONTAINS, QName.createQName("test"), ContentModel.TYPE_FOLDER,
|
||||
Collections.<QName, Serializable> singletonMap(ContentModel.PROP_NAME, "WebDavMethodExpiryLockTest" + System.currentTimeMillis())).getChildRef();
|
||||
|
||||
// Create test document.
|
||||
NodeRef nodeRef = nodeService.createNode(folderNodeRef, ContentModel.ASSOC_CONTAINS, QName.createQName("test"), ContentModel.TYPE_CONTENT,
|
||||
Collections.<QName, Serializable> singletonMap(ContentModel.PROP_NAME, "text.txt")).getChildRef();
|
||||
|
||||
lockMethod = new LockMethod();
|
||||
lockMethod.createExclusive = true;
|
||||
lockMethod.m_timeoutDuration = 1;
|
||||
lockMethod.setDetails(req, resp, webDAVHelper, nodeRef);
|
||||
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Object>()
|
||||
{
|
||||
@Override
|
||||
public Object execute() throws Throwable
|
||||
{
|
||||
try
|
||||
{
|
||||
// LOCK document.
|
||||
lockMethod.executeImpl();
|
||||
|
||||
//wait for the lock to expire up to 5 seconds
|
||||
int timeout = 5;
|
||||
while( timeout > 0 && !lockMethod.lockInfo.isExpired())
|
||||
{
|
||||
Thread.sleep(1000);
|
||||
timeout--;
|
||||
}
|
||||
|
||||
// LOCK against an expired lock.
|
||||
lockMethod.executeImpl();
|
||||
}
|
||||
catch (WebDAVServerException e)
|
||||
{
|
||||
logger.debug(e);
|
||||
Assert.fail("Document was not locked again, when lock has expired.");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
// Remove test folder.
|
||||
nodeService.deleteNode(folderNodeRef);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Logger.getLogger("org.alfresco.webdav.protocol").setLevel(webdavProtocolSaveLogLevel);
|
||||
Logger.getLogger("org.alfresco.repo.webdav").setLevel(repoWebdavSaveLogLevel);
|
||||
}
|
||||
}
|
||||
// @Category(IntermittentlyFailingTests.class) // ACS-959
|
||||
// @Test
|
||||
// public void expiryLockTest()
|
||||
// {
|
||||
// // ACE-4347 extra debug logging just for this test so we can see what's going on when it next fails
|
||||
// Level repoWebdavSaveLogLevel = Logger.getLogger("org.alfresco.repo.webdav").getLevel();
|
||||
// Logger.getLogger("org.alfresco.repo.webdav").setLevel(Level.ALL);
|
||||
// Level webdavProtocolSaveLogLevel = Logger.getLogger("org.alfresco.webdav.protocol").getLevel();
|
||||
// Logger.getLogger("org.alfresco.webdav.protocol").setLevel(Level.ALL);
|
||||
// try
|
||||
// {
|
||||
// setUpApplicationContext();
|
||||
//
|
||||
// req = new MockHttpServletRequest();
|
||||
// resp = new MockHttpServletResponse();
|
||||
//
|
||||
// String rootPath = "/app:company_home";
|
||||
// StoreRef storeRef = new StoreRef("workspace://SpacesStore");
|
||||
// NodeRef storeRootNodeRef = nodeService.getRootNode(storeRef);
|
||||
// List<NodeRef> nodeRefs = searchService.selectNodes(storeRootNodeRef, rootPath, null, namespaceService, false);
|
||||
// NodeRef defaultRootNode = nodeRefs.get(0);
|
||||
//
|
||||
// NodeRef rootNodeRef = tenantService.getRootNode(nodeService, searchService, namespaceService, rootPath, defaultRootNode);
|
||||
//
|
||||
// // Create test folder.
|
||||
// NodeRef folderNodeRef = nodeService.createNode(rootNodeRef, ContentModel.ASSOC_CONTAINS, QName.createQName("test"), ContentModel.TYPE_FOLDER,
|
||||
// Collections.<QName, Serializable> singletonMap(ContentModel.PROP_NAME, "WebDavMethodExpiryLockTest" + System.currentTimeMillis())).getChildRef();
|
||||
//
|
||||
// // Create test document.
|
||||
// NodeRef nodeRef = nodeService.createNode(folderNodeRef, ContentModel.ASSOC_CONTAINS, QName.createQName("test"), ContentModel.TYPE_CONTENT,
|
||||
// Collections.<QName, Serializable> singletonMap(ContentModel.PROP_NAME, "text.txt")).getChildRef();
|
||||
//
|
||||
// lockMethod = new LockMethod();
|
||||
// lockMethod.createExclusive = true;
|
||||
// lockMethod.m_timeoutDuration = 1;
|
||||
// lockMethod.setDetails(req, resp, webDAVHelper, nodeRef);
|
||||
//
|
||||
// transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Object>()
|
||||
// {
|
||||
// @Override
|
||||
// public Object execute() throws Throwable
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// // LOCK document.
|
||||
// lockMethod.executeImpl();
|
||||
//
|
||||
// //wait for the lock to expire up to 5 seconds
|
||||
// int timeout = 5;
|
||||
// while( timeout > 0 && !lockMethod.lockInfo.isExpired())
|
||||
// {
|
||||
// Thread.sleep(1000);
|
||||
// timeout--;
|
||||
// }
|
||||
//
|
||||
// // LOCK against an expired lock.
|
||||
// lockMethod.executeImpl();
|
||||
// }
|
||||
// catch (WebDAVServerException e)
|
||||
// {
|
||||
// logger.debug(e);
|
||||
// Assert.fail("Document was not locked again, when lock has expired.");
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// // Remove test folder.
|
||||
// nodeService.deleteNode(folderNodeRef);
|
||||
// }
|
||||
// finally
|
||||
// {
|
||||
// Logger.getLogger("org.alfresco.webdav.protocol").setLevel(webdavProtocolSaveLogLevel);
|
||||
// Logger.getLogger("org.alfresco.repo.webdav").setLevel(repoWebdavSaveLogLevel);
|
||||
// }
|
||||
// }
|
||||
|
||||
private void assertStatusCode(int expectedStatusCode, String userAgent)
|
||||
{
|
||||
|
Reference in New Issue
Block a user