Fix/repo 2025 cat tests (#31)

REPO-2025 Marked existing tests with categories LuceneTests and DBTests

Also includes a few PerformanceTests. So that the DB tests could be run on their own for each DB, a new
AllDBTestsTestSuite was created and it was tried out with MySQL (REPO-2002), MariaDB (REPO-2005) and PostgreSQL (REPO-2954).

A few existing TestSuites have been removed because we now have AllDBTestsTestSuite or the same set was covered by one of the TestSuites run in the latest Bamboo build jobs.
This commit is contained in:
alandavis
2017-10-11 09:37:32 +01:00
committed by GitHub
parent d441f00c60
commit b0a3a4edac
138 changed files with 4802 additions and 5006 deletions

View File

@@ -119,6 +119,7 @@ import org.alfresco.service.namespace.QName;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.Pair;
import org.alfresco.util.testing.category.LuceneTests;
import org.apache.chemistry.opencmis.commons.PropertyIds;
import org.apache.chemistry.opencmis.commons.data.Ace;
import org.apache.chemistry.opencmis.commons.data.AllowableActions;
@@ -166,6 +167,7 @@ import org.apache.commons.logging.LogFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
import org.springframework.extensions.webscripts.GUID;
@@ -175,6 +177,7 @@ import org.springframework.extensions.webscripts.GUID;
* @author steveglover
*
*/
@Category(LuceneTests.class)
public class CMISTest
{
private static Log logger = LogFactory.getLog(CMISTest.class);
@@ -3378,19 +3381,19 @@ public class CMISTest
cmisService.updateProperties(repositoryId, new Holder<String>(fileInfo.getNodeRef().toString()), null, properties, null);
}
//This extra check was added due to MNT-16641.
{
PropertiesImpl properties = new PropertiesImpl();
properties.addProperty(new PropertyStringImpl(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, "P:cm:lockable"));
Set<QName> existingAspects = nodeService.getAspects(docs.get(0).getNodeRef());
cmisService.updateProperties(repositoryId,new Holder<String>(docs.get(0).getNodeRef().toString()), null, properties, null);
Set<QName> updatedAspects = nodeService.getAspects(docs.get(0).getNodeRef());
updatedAspects.removeAll(existingAspects);
assertEquals(ContentModel.ASPECT_LOCKABLE, updatedAspects.iterator().next());
}
//This extra check was added due to MNT-16641.
{
PropertiesImpl properties = new PropertiesImpl();
properties.addProperty(new PropertyStringImpl(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, "P:cm:lockable"));
Set<QName> existingAspects = nodeService.getAspects(docs.get(0).getNodeRef());
cmisService.updateProperties(repositoryId,new Holder<String>(docs.get(0).getNodeRef().toString()), null, properties, null);
Set<QName> updatedAspects = nodeService.getAspects(docs.get(0).getNodeRef());
updatedAspects.removeAll(existingAspects);
assertEquals(ContentModel.ASPECT_LOCKABLE, updatedAspects.iterator().next());
}
return repositoryId;
}
}, CmisVersion.CMIS_1_1);