mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-17 14:21:39 +00:00
Add unit test to look for unreferenced test classes. (#368)
* Add unit test to look for unreferenced test classes. It's very unusual that we write a test class which should not also be added to a test suite. * Utilise the hierarchy of NonBuildTests markers to help exclude false positives. * Update all omitted tests. Either add the test to AllUnitTestsSuite if it passes and runs quickly, mark the test with the appropriate NonBuildTests interface or mark the class as abstract (if appropriate). Mark one test (RemoteTransformerClientTest) as a NeverRunTest even though it passes because it takes 12 seconds to run and is marked as deprecated. * Mark two Camel tests as 'never run' because they failed on the CI.
This commit is contained in:
@@ -865,6 +865,12 @@
|
|||||||
<version>${dependency.awaitility.version}</version>
|
<version>${dependency.awaitility.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.reflections</groupId>
|
||||||
|
<artifactId>reflections</artifactId>
|
||||||
|
<version>0.9.12</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@@ -43,10 +43,14 @@ import org.junit.runners.Suite;
|
|||||||
org.alfresco.encryption.KeyStoreKeyProviderTest.class,
|
org.alfresco.encryption.KeyStoreKeyProviderTest.class,
|
||||||
org.alfresco.filesys.config.ServerConfigurationBeanTest.class,
|
org.alfresco.filesys.config.ServerConfigurationBeanTest.class,
|
||||||
org.alfresco.filesys.repo.rules.ShuffleTest.class,
|
org.alfresco.filesys.repo.rules.ShuffleTest.class,
|
||||||
|
org.alfresco.opencmis.AlfrescoCmisExceptionInterceptorTest.class,
|
||||||
org.alfresco.repo.admin.Log4JHierarchyInitTest.class,
|
org.alfresco.repo.admin.Log4JHierarchyInitTest.class,
|
||||||
org.alfresco.repo.attributes.PropTablesCleanupJobTest.class,
|
org.alfresco.repo.attributes.PropTablesCleanupJobTest.class,
|
||||||
|
org.alfresco.repo.cache.AbstractCacheFactoryTest.class,
|
||||||
org.alfresco.repo.cache.DefaultCacheFactoryTest.class,
|
org.alfresco.repo.cache.DefaultCacheFactoryTest.class,
|
||||||
org.alfresco.repo.cache.DefaultSimpleCacheTest.class,
|
org.alfresco.repo.cache.DefaultSimpleCacheTest.class,
|
||||||
|
org.alfresco.repo.cache.InMemoryCacheStatisticsTest.class,
|
||||||
|
org.alfresco.repo.cache.TransactionStatsTest.class,
|
||||||
org.alfresco.repo.cache.lookup.EntityLookupCacheTest.class,
|
org.alfresco.repo.cache.lookup.EntityLookupCacheTest.class,
|
||||||
org.alfresco.repo.calendar.CalendarHelpersTest.class,
|
org.alfresco.repo.calendar.CalendarHelpersTest.class,
|
||||||
org.alfresco.repo.copy.CopyServiceImplUnitTest.class,
|
org.alfresco.repo.copy.CopyServiceImplUnitTest.class,
|
||||||
@@ -56,13 +60,16 @@ import org.junit.runners.Suite;
|
|||||||
org.alfresco.repo.forms.processor.workflow.WorkflowFormProcessorTest.class,
|
org.alfresco.repo.forms.processor.workflow.WorkflowFormProcessorTest.class,
|
||||||
org.alfresco.repo.invitation.site.InviteSenderTest.class,
|
org.alfresco.repo.invitation.site.InviteSenderTest.class,
|
||||||
org.alfresco.repo.invitation.site.InviteModeratedSenderTest.class,
|
org.alfresco.repo.invitation.site.InviteModeratedSenderTest.class,
|
||||||
|
org.alfresco.repo.jscript.ScriptSearchTest.class,
|
||||||
org.alfresco.repo.lock.LockUtilsTest.class,
|
org.alfresco.repo.lock.LockUtilsTest.class,
|
||||||
org.alfresco.repo.lock.mem.LockStoreImplTest.class,
|
org.alfresco.repo.lock.mem.LockStoreImplTest.class,
|
||||||
|
org.alfresco.repo.management.subsystems.CryptodocSwitchableApplicationContextFactoryTest.class,
|
||||||
org.alfresco.repo.module.ModuleDetailsImplTest.class,
|
org.alfresco.repo.module.ModuleDetailsImplTest.class,
|
||||||
org.alfresco.repo.module.ModuleVersionNumberTest.class,
|
org.alfresco.repo.module.ModuleVersionNumberTest.class,
|
||||||
org.alfresco.repo.module.tool.ModuleManagementToolTest.class,
|
org.alfresco.repo.module.tool.ModuleManagementToolTest.class,
|
||||||
org.alfresco.repo.module.tool.WarHelperImplTest.class,
|
org.alfresco.repo.module.tool.WarHelperImplTest.class,
|
||||||
org.alfresco.repo.module.tool.ModuleServiceImplTest.class,
|
org.alfresco.repo.module.tool.ModuleServiceImplTest.class,
|
||||||
|
org.alfresco.repo.node.integrity.IntegrityEventTest.class,
|
||||||
org.alfresco.repo.policy.MTPolicyComponentTest.class,
|
org.alfresco.repo.policy.MTPolicyComponentTest.class,
|
||||||
org.alfresco.repo.policy.PolicyComponentTest.class,
|
org.alfresco.repo.policy.PolicyComponentTest.class,
|
||||||
org.alfresco.repo.rendition.RenditionNodeManagerTest.class,
|
org.alfresco.repo.rendition.RenditionNodeManagerTest.class,
|
||||||
@@ -70,6 +77,7 @@ import org.junit.runners.Suite;
|
|||||||
org.alfresco.repo.replication.ReplicationServiceImplTest.class,
|
org.alfresco.repo.replication.ReplicationServiceImplTest.class,
|
||||||
org.alfresco.repo.service.StoreRedirectorProxyFactoryTest.class,
|
org.alfresco.repo.service.StoreRedirectorProxyFactoryTest.class,
|
||||||
org.alfresco.repo.site.RoleComparatorImplTest.class,
|
org.alfresco.repo.site.RoleComparatorImplTest.class,
|
||||||
|
org.alfresco.repo.tenant.MultiTAdminServiceImplTest.class,
|
||||||
org.alfresco.repo.thumbnail.ThumbnailServiceImplParameterTest.class,
|
org.alfresco.repo.thumbnail.ThumbnailServiceImplParameterTest.class,
|
||||||
org.alfresco.repo.transfer.ContentChunkerImplTest.class,
|
org.alfresco.repo.transfer.ContentChunkerImplTest.class,
|
||||||
org.alfresco.repo.transfer.HttpClientTransmitterImplTest.class,
|
org.alfresco.repo.transfer.HttpClientTransmitterImplTest.class,
|
||||||
@@ -110,17 +118,27 @@ import org.junit.runners.Suite;
|
|||||||
org.alfresco.util.schemacomp.validator.NameValidatorTest.class,
|
org.alfresco.util.schemacomp.validator.NameValidatorTest.class,
|
||||||
org.alfresco.util.schemacomp.validator.SchemaVersionValidatorTest.class,
|
org.alfresco.util.schemacomp.validator.SchemaVersionValidatorTest.class,
|
||||||
org.alfresco.util.schemacomp.validator.TypeNameOnlyValidatorTest.class,
|
org.alfresco.util.schemacomp.validator.TypeNameOnlyValidatorTest.class,
|
||||||
|
org.alfresco.util.test.OmittedTestClassFinderUnitTest.class,
|
||||||
org.alfresco.util.test.junitrules.TemporaryMockOverrideTest.class,
|
org.alfresco.util.test.junitrules.TemporaryMockOverrideTest.class,
|
||||||
|
org.alfresco.repo.search.impl.querymodel.impl.db.DBQueryEngineTest.class,
|
||||||
|
org.alfresco.repo.search.impl.querymodel.impl.db.NodePermissionAssessorLimitsTest.class,
|
||||||
|
org.alfresco.repo.search.impl.querymodel.impl.db.NodePermissionAssessorPermissionsTest.class,
|
||||||
|
org.alfresco.repo.search.impl.solr.DbOrIndexSwitchingQueryLanguageTest.class,
|
||||||
org.alfresco.repo.search.impl.solr.SolrQueryHTTPClientTest.class,
|
org.alfresco.repo.search.impl.solr.SolrQueryHTTPClientTest.class,
|
||||||
org.alfresco.repo.search.impl.solr.SolrSQLHttpClientTest.class,
|
org.alfresco.repo.search.impl.solr.SolrSQLHttpClientTest.class,
|
||||||
org.alfresco.repo.search.impl.solr.SolrStatsResultTest.class,
|
org.alfresco.repo.search.impl.solr.SolrStatsResultTest.class,
|
||||||
|
org.alfresco.repo.search.impl.solr.SolrSQLJSONResultMetadataSetTest.class,
|
||||||
org.alfresco.repo.search.impl.solr.facet.SolrFacetComparatorTest.class,
|
org.alfresco.repo.search.impl.solr.facet.SolrFacetComparatorTest.class,
|
||||||
org.alfresco.repo.search.impl.solr.facet.FacetQNameUtilsTest.class,
|
org.alfresco.repo.search.impl.solr.facet.FacetQNameUtilsTest.class,
|
||||||
org.alfresco.util.BeanExtenderUnitTest.class,
|
org.alfresco.util.BeanExtenderUnitTest.class,
|
||||||
org.alfresco.repo.search.impl.solr.SpellCheckDecisionManagerTest.class,
|
org.alfresco.repo.search.impl.solr.SpellCheckDecisionManagerTest.class,
|
||||||
org.alfresco.repo.search.impl.solr.SolrStoreMappingWrapperTest.class,
|
org.alfresco.repo.search.impl.solr.SolrStoreMappingWrapperTest.class,
|
||||||
|
org.alfresco.repo.solr.SOLRTrackingComponentUnitTest.class,
|
||||||
org.alfresco.repo.security.authentication.CompositePasswordEncoderTest.class,
|
org.alfresco.repo.security.authentication.CompositePasswordEncoderTest.class,
|
||||||
org.alfresco.repo.security.authentication.PasswordHashingTest.class,
|
org.alfresco.repo.security.authentication.PasswordHashingTest.class,
|
||||||
|
org.alfresco.repo.security.authority.script.ScriptAuthorityService_RegExTest.class,
|
||||||
|
org.alfresco.repo.security.permissions.PermissionCheckCollectionTest.class,
|
||||||
|
org.alfresco.repo.security.sync.LDAPUserRegistryTest.class,
|
||||||
org.alfresco.traitextender.TraitExtenderIntegrationTest.class,
|
org.alfresco.traitextender.TraitExtenderIntegrationTest.class,
|
||||||
org.alfresco.traitextender.AJExtensionsCompileTest.class,
|
org.alfresco.traitextender.AJExtensionsCompileTest.class,
|
||||||
|
|
||||||
@@ -157,8 +175,12 @@ import org.junit.runners.Suite;
|
|||||||
org.alfresco.repo.action.ActionConditionImplTest.class,
|
org.alfresco.repo.action.ActionConditionImplTest.class,
|
||||||
org.alfresco.repo.action.CompositeActionImplTest.class,
|
org.alfresco.repo.action.CompositeActionImplTest.class,
|
||||||
org.alfresco.repo.action.CompositeActionConditionImplTest.class,
|
org.alfresco.repo.action.CompositeActionConditionImplTest.class,
|
||||||
|
org.alfresco.repo.action.executer.TransformActionExecuterTest.class,
|
||||||
org.alfresco.repo.audit.AuditableAnnotationTest.class,
|
org.alfresco.repo.audit.AuditableAnnotationTest.class,
|
||||||
org.alfresco.repo.audit.PropertyAuditFilterTest.class,
|
org.alfresco.repo.audit.PropertyAuditFilterTest.class,
|
||||||
|
org.alfresco.repo.audit.access.NodeChangeTest.class,
|
||||||
|
org.alfresco.repo.content.LimitedStreamCopierTest.class,
|
||||||
|
org.alfresco.repo.content.filestore.FileIOTest.class,
|
||||||
org.alfresco.repo.content.filestore.SpoofedTextContentReaderTest.class,
|
org.alfresco.repo.content.filestore.SpoofedTextContentReaderTest.class,
|
||||||
org.alfresco.repo.content.ContentDataTest.class,
|
org.alfresco.repo.content.ContentDataTest.class,
|
||||||
org.alfresco.service.cmr.repository.TransformationOptionLimitsTest.class,
|
org.alfresco.service.cmr.repository.TransformationOptionLimitsTest.class,
|
||||||
@@ -172,6 +194,7 @@ import org.junit.runners.Suite;
|
|||||||
org.alfresco.repo.content.caching.ContentCacheImplTest.class,
|
org.alfresco.repo.content.caching.ContentCacheImplTest.class,
|
||||||
org.alfresco.repo.domain.permissions.FixedAclUpdaterUnitTest.class,
|
org.alfresco.repo.domain.permissions.FixedAclUpdaterUnitTest.class,
|
||||||
org.alfresco.repo.domain.propval.PropertyTypeConverterTest.class,
|
org.alfresco.repo.domain.propval.PropertyTypeConverterTest.class,
|
||||||
|
org.alfresco.repo.domain.schema.script.ScriptBundleExecutorImplTest.class,
|
||||||
org.alfresco.repo.search.MLAnaysisModeExpansionTest.class,
|
org.alfresco.repo.search.MLAnaysisModeExpansionTest.class,
|
||||||
org.alfresco.repo.search.DocumentNavigatorTest.class,
|
org.alfresco.repo.search.DocumentNavigatorTest.class,
|
||||||
org.alfresco.util.NumericEncodingTest.class,
|
org.alfresco.util.NumericEncodingTest.class,
|
||||||
@@ -180,6 +203,7 @@ import org.junit.runners.Suite;
|
|||||||
org.alfresco.repo.search.impl.parsers.FTSTest.class,
|
org.alfresco.repo.search.impl.parsers.FTSTest.class,
|
||||||
org.alfresco.repo.security.authentication.AlfrescoSSLSocketFactoryTest.class,
|
org.alfresco.repo.security.authentication.AlfrescoSSLSocketFactoryTest.class,
|
||||||
org.alfresco.repo.security.authentication.AuthorizationTest.class,
|
org.alfresco.repo.security.authentication.AuthorizationTest.class,
|
||||||
|
org.alfresco.repo.security.permissions.PermissionCheckedCollectionTest.class,
|
||||||
org.alfresco.repo.security.permissions.impl.acegi.FilteringResultSetTest.class,
|
org.alfresco.repo.security.permissions.impl.acegi.FilteringResultSetTest.class,
|
||||||
org.alfresco.repo.security.authentication.ChainingAuthenticationServiceTest.class,
|
org.alfresco.repo.security.authentication.ChainingAuthenticationServiceTest.class,
|
||||||
org.alfresco.repo.security.authentication.NameBasedUserNameGeneratorTest.class,
|
org.alfresco.repo.security.authentication.NameBasedUserNameGeneratorTest.class,
|
||||||
@@ -187,6 +211,7 @@ import org.junit.runners.Suite;
|
|||||||
org.alfresco.repo.version.common.VersionHistoryImplTest.class,
|
org.alfresco.repo.version.common.VersionHistoryImplTest.class,
|
||||||
org.alfresco.repo.version.common.versionlabel.SerialVersionLabelPolicyTest.class,
|
org.alfresco.repo.version.common.versionlabel.SerialVersionLabelPolicyTest.class,
|
||||||
org.alfresco.repo.workflow.activiti.WorklfowObjectFactoryTest.class,
|
org.alfresco.repo.workflow.activiti.WorklfowObjectFactoryTest.class,
|
||||||
|
org.alfresco.repo.workflow.activiti.properties.ActivitiPriorityPropertyHandlerTest.class,
|
||||||
org.alfresco.repo.workflow.WorkflowSuiteContextShutdownTest.class,
|
org.alfresco.repo.workflow.WorkflowSuiteContextShutdownTest.class,
|
||||||
org.alfresco.repo.search.LuceneUtilsTest.class,
|
org.alfresco.repo.search.LuceneUtilsTest.class,
|
||||||
|
|
||||||
@@ -197,6 +222,7 @@ import org.junit.runners.Suite;
|
|||||||
org.alfresco.heartbeat.ConfigurationDataCollectorTest.class,
|
org.alfresco.heartbeat.ConfigurationDataCollectorTest.class,
|
||||||
org.alfresco.heartbeat.InfoDataCollectorTest.class,
|
org.alfresco.heartbeat.InfoDataCollectorTest.class,
|
||||||
org.alfresco.heartbeat.ModelUsageDataCollectorTest.class,
|
org.alfresco.heartbeat.ModelUsageDataCollectorTest.class,
|
||||||
|
org.alfresco.heartbeat.SessionsUsageDataCollectorTest.class,
|
||||||
org.alfresco.heartbeat.SystemUsageDataCollectorTest.class,
|
org.alfresco.heartbeat.SystemUsageDataCollectorTest.class,
|
||||||
|
|
||||||
org.alfresco.util.BeanExtenderUnitTest.class,
|
org.alfresco.util.BeanExtenderUnitTest.class,
|
||||||
@@ -204,6 +230,7 @@ import org.junit.runners.Suite;
|
|||||||
org.alfresco.util.resource.HierarchicalResourceLoaderTest.class,
|
org.alfresco.util.resource.HierarchicalResourceLoaderTest.class,
|
||||||
org.alfresco.repo.events.ClientUtilTest.class,
|
org.alfresco.repo.events.ClientUtilTest.class,
|
||||||
org.alfresco.repo.rendition2.RenditionService2Test.class,
|
org.alfresco.repo.rendition2.RenditionService2Test.class,
|
||||||
|
org.alfresco.repo.rendition2.TransformationOptionsConverterTest.class,
|
||||||
org.alfresco.transform.client.registry.TransformServiceRegistryConfigTest.class,
|
org.alfresco.transform.client.registry.TransformServiceRegistryConfigTest.class,
|
||||||
|
|
||||||
org.alfresco.repo.event2.RepoEvent2UnitSuite.class
|
org.alfresco.repo.event2.RepoEvent2UnitSuite.class
|
||||||
|
@@ -25,10 +25,12 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.messaging.camel;
|
package org.alfresco.messaging.camel;
|
||||||
|
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.apache.camel.CamelContext;
|
import org.apache.camel.CamelContext;
|
||||||
import org.apache.camel.Produce;
|
import org.apache.camel.Produce;
|
||||||
import org.apache.camel.ProducerTemplate;
|
import org.apache.camel.ProducerTemplate;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
@@ -40,6 +42,7 @@ import static org.junit.Assert.assertEquals;
|
|||||||
* Tests Camel components defined in the application's Spring context
|
* Tests Camel components defined in the application's Spring context
|
||||||
*/
|
*/
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
@ContextConfiguration(locations = "/test-messaging-context.xml")
|
@ContextConfiguration(locations = "/test-messaging-context.xml")
|
||||||
public class CamelComponentsTest {
|
public class CamelComponentsTest {
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@@ -27,12 +27,14 @@ package org.alfresco.messaging.camel;
|
|||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.apache.camel.CamelContext;
|
import org.apache.camel.CamelContext;
|
||||||
import org.apache.camel.EndpointInject;
|
import org.apache.camel.EndpointInject;
|
||||||
import org.apache.camel.Produce;
|
import org.apache.camel.Produce;
|
||||||
import org.apache.camel.ProducerTemplate;
|
import org.apache.camel.ProducerTemplate;
|
||||||
import org.apache.camel.component.mock.MockEndpoint;
|
import org.apache.camel.component.mock.MockEndpoint;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
@@ -44,6 +46,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
|||||||
* @author Ray Gauss II
|
* @author Ray Gauss II
|
||||||
*/
|
*/
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
@ContextConfiguration(locations = "/test-messaging-context.xml")
|
@ContextConfiguration(locations = "/test-messaging-context.xml")
|
||||||
public class CamelRoutesTest
|
public class CamelRoutesTest
|
||||||
{
|
{
|
||||||
|
@@ -32,13 +32,16 @@ import org.alfresco.repo.action.evaluator.compare.ComparePropertyValueOperation;
|
|||||||
import org.alfresco.service.cmr.action.ActionService;
|
import org.alfresco.service.cmr.action.ActionService;
|
||||||
import org.alfresco.service.cmr.action.ParameterConstraint;
|
import org.alfresco.service.cmr.action.ParameterConstraint;
|
||||||
import org.alfresco.util.BaseSpringTest;
|
import org.alfresco.util.BaseSpringTest;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action parameter constraint unit test
|
* Action parameter constraint unit test
|
||||||
*
|
*
|
||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
*/
|
*/
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class ActionParameterConstraintTest extends BaseSpringTest
|
public class ActionParameterConstraintTest extends BaseSpringTest
|
||||||
{
|
{
|
||||||
private static final String COMPARE_OP = "ac-compare-operations";
|
private static final String COMPARE_OP = "ac-compare-operations";
|
||||||
|
@@ -34,7 +34,9 @@ import org.alfresco.service.cmr.repository.StoreRef;
|
|||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.util.BaseSpringTest;
|
import org.alfresco.util.BaseSpringTest;
|
||||||
import org.alfresco.util.GUID;
|
import org.alfresco.util.GUID;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,6 +46,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
* @since 3.4
|
* @since 3.4
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class HasChildEvaluatorTest extends BaseSpringTest
|
public class HasChildEvaluatorTest extends BaseSpringTest
|
||||||
{
|
{
|
||||||
private NodeService nodeService;
|
private NodeService nodeService;
|
||||||
|
@@ -36,7 +36,9 @@ import org.alfresco.service.cmr.tagging.TaggingService;
|
|||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.util.BaseSpringTest;
|
import org.alfresco.util.BaseSpringTest;
|
||||||
import org.alfresco.util.GUID;
|
import org.alfresco.util.GUID;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,6 +47,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class HasTagEvaluatorTest extends BaseSpringTest
|
public class HasTagEvaluatorTest extends BaseSpringTest
|
||||||
{
|
{
|
||||||
private NodeService nodeService;
|
private NodeService nodeService;
|
||||||
|
@@ -36,6 +36,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.test_category.BaseSpringTestsCategory;
|
import org.alfresco.test_category.BaseSpringTestsCategory;
|
||||||
import org.alfresco.util.BaseSpringTest;
|
import org.alfresco.util.BaseSpringTest;
|
||||||
import org.alfresco.util.GUID;
|
import org.alfresco.util.GUID;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -43,7 +44,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
/**
|
/**
|
||||||
* Tests checkout using action executer
|
* Tests checkout using action executer
|
||||||
*/
|
*/
|
||||||
@Category(BaseSpringTestsCategory.class)
|
@Category({BaseSpringTestsCategory.class, NeverRunsTests.class})
|
||||||
@Transactional
|
@Transactional
|
||||||
public class CheckOutActionExecuterTest extends BaseSpringTest
|
public class CheckOutActionExecuterTest extends BaseSpringTest
|
||||||
{
|
{
|
||||||
|
@@ -51,6 +51,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.test_category.BaseSpringTestsCategory;
|
import org.alfresco.test_category.BaseSpringTestsCategory;
|
||||||
import org.alfresco.util.BaseSpringTest;
|
import org.alfresco.util.BaseSpringTest;
|
||||||
import org.alfresco.util.GUID;
|
import org.alfresco.util.GUID;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
|
|
||||||
@@ -68,7 +69,7 @@ import static org.alfresco.repo.rule.RuleModel.ASPECT_IGNORE_INHERITED_RULES;
|
|||||||
*
|
*
|
||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
*/
|
*/
|
||||||
@Category(BaseSpringTestsCategory.class)
|
@Category({BaseSpringTestsCategory.class, NeverRunsTests.class})
|
||||||
@Transactional
|
@Transactional
|
||||||
public class ExecuteAllRulesActionExecuterTest extends BaseSpringTest
|
public class ExecuteAllRulesActionExecuterTest extends BaseSpringTest
|
||||||
{
|
{
|
||||||
|
@@ -43,6 +43,7 @@ import org.alfresco.util.test.junitrules.RunAsFullyAuthenticatedRule;
|
|||||||
import org.alfresco.util.test.junitrules.TemporaryNodes;
|
import org.alfresco.util.test.junitrules.TemporaryNodes;
|
||||||
import org.alfresco.util.test.junitrules.TemporarySites;
|
import org.alfresco.util.test.junitrules.TemporarySites;
|
||||||
import org.alfresco.util.test.junitrules.TemporarySites.TestSiteAndMemberInfo;
|
import org.alfresco.util.test.junitrules.TemporarySites.TestSiteAndMemberInfo;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.ClassRule;
|
import org.junit.ClassRule;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
@@ -51,7 +52,7 @@ import org.junit.experimental.categories.Category;
|
|||||||
import org.junit.rules.RuleChain;
|
import org.junit.rules.RuleChain;
|
||||||
|
|
||||||
/** Tests for {@link TakeOwnershipActionExecuter}. */
|
/** Tests for {@link TakeOwnershipActionExecuter}. */
|
||||||
@Category(OwnJVMTestsCategory.class)
|
@Category({OwnJVMTestsCategory.class, NeverRunsTests.class})
|
||||||
public class TakeOwnershipActionExecuterTest
|
public class TakeOwnershipActionExecuterTest
|
||||||
{
|
{
|
||||||
// Rule to initialise the default Alfresco spring configuration
|
// Rule to initialise the default Alfresco spring configuration
|
||||||
|
@@ -38,6 +38,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.test_category.BaseSpringTestsCategory;
|
import org.alfresco.test_category.BaseSpringTestsCategory;
|
||||||
import org.alfresco.util.BaseAlfrescoSpringTest;
|
import org.alfresco.util.BaseAlfrescoSpringTest;
|
||||||
import org.alfresco.util.GUID;
|
import org.alfresco.util.GUID;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@ import org.junit.experimental.categories.Category;
|
|||||||
*
|
*
|
||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
*/
|
*/
|
||||||
@Category(BaseSpringTestsCategory.class)
|
@Category({BaseSpringTestsCategory.class, NeverRunsTests.class})
|
||||||
public class TransitionSimpleWorkflowActionExecuterTest extends BaseAlfrescoSpringTest
|
public class TransitionSimpleWorkflowActionExecuterTest extends BaseAlfrescoSpringTest
|
||||||
{
|
{
|
||||||
private FileFolderService fileFolderService;
|
private FileFolderService fileFolderService;
|
||||||
|
@@ -41,6 +41,7 @@ import org.alfresco.service.transaction.TransactionService;
|
|||||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
import org.alfresco.util.testing.category.LuceneTests;
|
import org.alfresco.util.testing.category.LuceneTests;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.extensions.surf.util.ISO8601DateFormat;
|
import org.springframework.extensions.surf.util.ISO8601DateFormat;
|
||||||
@@ -50,7 +51,7 @@ import org.springframework.extensions.surf.util.ISO8601DateFormat;
|
|||||||
*
|
*
|
||||||
* @author Andy Hind
|
* @author Andy Hind
|
||||||
*/
|
*/
|
||||||
@Category({OwnJVMTestsCategory.class, LuceneTests.class})
|
@Category({OwnJVMTestsCategory.class, LuceneTests.class, NeverRunsTests.class})
|
||||||
public class FreeMarkerModelLuceneFunctionTest extends TestCase
|
public class FreeMarkerModelLuceneFunctionTest extends TestCase
|
||||||
{
|
{
|
||||||
//private static SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.sssZ");
|
//private static SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.sssZ");
|
||||||
|
@@ -77,7 +77,7 @@ import static org.junit.Assert.fail;
|
|||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
@Category(LuceneTests.class)
|
@Category(LuceneTests.class)
|
||||||
public class AbstractBulkImportTests
|
public abstract class AbstractBulkImportTests
|
||||||
{
|
{
|
||||||
protected static ApplicationContext ctx;
|
protected static ApplicationContext ctx;
|
||||||
|
|
||||||
|
@@ -37,6 +37,7 @@ import org.alfresco.service.cmr.repository.ContentReader;
|
|||||||
import org.alfresco.service.cmr.repository.MimetypeService;
|
import org.alfresco.service.cmr.repository.MimetypeService;
|
||||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||||
import org.alfresco.util.DataModelTestApplicationContextHelper;
|
import org.alfresco.util.DataModelTestApplicationContextHelper;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.apache.poi.util.IOUtils;
|
import org.apache.poi.util.IOUtils;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
@@ -47,7 +48,7 @@ import org.springframework.context.ApplicationContext;
|
|||||||
* @see org.alfresco.repo.content.MimetypeMap
|
* @see org.alfresco.repo.content.MimetypeMap
|
||||||
* @see org.alfresco.repo.content.MimetypeMapTest
|
* @see org.alfresco.repo.content.MimetypeMapTest
|
||||||
*/
|
*/
|
||||||
@Category(OwnJVMTestsCategory.class)
|
@Category({OwnJVMTestsCategory.class, NeverRunsTests.class})
|
||||||
public class MimetypeMapContentTest extends TestCase
|
public class MimetypeMapContentTest extends TestCase
|
||||||
{
|
{
|
||||||
private static ApplicationContext ctx = DataModelTestApplicationContextHelper.getApplicationContext();
|
private static ApplicationContext ctx = DataModelTestApplicationContextHelper.getApplicationContext();
|
||||||
|
@@ -46,6 +46,7 @@ import org.alfresco.service.cmr.repository.ContentReader;
|
|||||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||||
import org.alfresco.util.TempFileProvider;
|
import org.alfresco.util.TempFileProvider;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
import org.junit.internal.runners.JUnit38ClassRunner;
|
import org.junit.internal.runners.JUnit38ClassRunner;
|
||||||
@@ -58,7 +59,7 @@ import org.junit.runner.RunWith;
|
|||||||
* @author Matt Ward
|
* @author Matt Ward
|
||||||
*/
|
*/
|
||||||
@RunWith(JUnit38ClassRunner.class)
|
@RunWith(JUnit38ClassRunner.class)
|
||||||
@Category(OwnJVMTestsCategory.class)
|
@Category({OwnJVMTestsCategory.class, NeverRunsTests.class})
|
||||||
public class CachingContentStoreSpringTest extends AbstractWritableContentStoreTest
|
public class CachingContentStoreSpringTest extends AbstractWritableContentStoreTest
|
||||||
{
|
{
|
||||||
private CachingContentStore store;
|
private CachingContentStore store;
|
||||||
|
@@ -29,6 +29,7 @@ package org.alfresco.repo.content.filestore;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
@@ -43,7 +44,7 @@ import static org.junit.Assert.assertTrue;
|
|||||||
* @author Andreea Dragoi
|
* @author Andreea Dragoi
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Category(OwnJVMTestsCategory.class)
|
@Category({OwnJVMTestsCategory.class, NeverRunsTests.class})
|
||||||
public class BucketAwareFileContentStoreTest extends FileContentStoreTest
|
public class BucketAwareFileContentStoreTest extends FileContentStoreTest
|
||||||
{
|
{
|
||||||
private static final int BUCKETS_PER_MINUTE = 20;
|
private static final int BUCKETS_PER_MINUTE = 20;
|
||||||
|
@@ -29,6 +29,7 @@ import java.io.File;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
@@ -39,7 +40,7 @@ import static org.junit.Assert.assertTrue;
|
|||||||
* to route content from a store to a selection of filesystem volumes
|
* to route content from a store to a selection of filesystem volumes
|
||||||
* @author Andreea Dragoi
|
* @author Andreea Dragoi
|
||||||
*/
|
*/
|
||||||
@Category(OwnJVMTestsCategory.class)
|
@Category({OwnJVMTestsCategory.class, NeverRunsTests.class})
|
||||||
public class VolumeAwareFileContentStoreTest extends FileContentStoreTest{
|
public class VolumeAwareFileContentStoreTest extends FileContentStoreTest{
|
||||||
|
|
||||||
private static final String VOLUMES = "volumeA,volumeB,volumeC";
|
private static final String VOLUMES = "volumeA,volumeB,volumeC";
|
||||||
|
@@ -33,7 +33,6 @@ import java.io.FileNotFoundException;
|
|||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.repo.action.ActionImpl;
|
import org.alfresco.repo.action.ActionImpl;
|
||||||
import org.alfresco.repo.action.executer.ActionExecuter;
|
import org.alfresco.repo.action.executer.ActionExecuter;
|
||||||
@@ -59,6 +58,8 @@ import org.alfresco.service.namespace.NamespaceService;
|
|||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.util.GUID;
|
import org.alfresco.util.GUID;
|
||||||
import org.alfresco.util.PropertyMap;
|
import org.alfresco.util.PropertyMap;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
|
|
||||||
@@ -69,6 +70,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
|||||||
*
|
*
|
||||||
* @author Derek Hulley
|
* @author Derek Hulley
|
||||||
*/
|
*/
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class XmlMetadataExtracterTest extends TestCase
|
public class XmlMetadataExtracterTest extends TestCase
|
||||||
{
|
{
|
||||||
private static final String FILE_ALFRESCO_MODEL = "xml-metadata/alfresco-model-sample.xml";
|
private static final String FILE_ALFRESCO_MODEL = "xml-metadata/alfresco-model-sample.xml";
|
||||||
|
@@ -40,6 +40,7 @@ import org.alfresco.service.cmr.repository.DirectAccessUrl;
|
|||||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||||
import org.alfresco.util.GUID;
|
import org.alfresco.util.GUID;
|
||||||
import org.alfresco.util.TempFileProvider;
|
import org.alfresco.util.TempFileProvider;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@@ -69,7 +70,7 @@ import static org.mockito.Mockito.when;
|
|||||||
* @author Derek Hulley
|
* @author Derek Hulley
|
||||||
* @author Mark Rogers
|
* @author Mark Rogers
|
||||||
*/
|
*/
|
||||||
@Category(OwnJVMTestsCategory.class)
|
@Category({OwnJVMTestsCategory.class, NeverRunsTests.class})
|
||||||
public class AggregatingContentStoreTest extends AbstractWritableContentStoreTest
|
public class AggregatingContentStoreTest extends AbstractWritableContentStoreTest
|
||||||
{
|
{
|
||||||
private static final String SOME_CONTENT = "The No. 1 Ladies' Detective Agency";
|
private static final String SOME_CONTENT = "The No. 1 Ladies' Detective Agency";
|
||||||
|
@@ -28,6 +28,7 @@ package org.alfresco.repo.content.transform;
|
|||||||
import org.alfresco.service.cmr.repository.ContentReader;
|
import org.alfresco.service.cmr.repository.ContentReader;
|
||||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||||
import org.alfresco.util.Pair;
|
import org.alfresco.util.Pair;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.http.Header;
|
import org.apache.http.Header;
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.http.HttpEntity;
|
||||||
@@ -37,6 +38,7 @@ import org.apache.http.client.methods.HttpGet;
|
|||||||
import org.apache.http.client.methods.HttpPost;
|
import org.apache.http.client.methods.HttpPost;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
import org.mockito.MockitoAnnotations;
|
import org.mockito.MockitoAnnotations;
|
||||||
import org.mockito.Spy;
|
import org.mockito.Spy;
|
||||||
@@ -61,6 +63,7 @@ import static org.springframework.test.util.AssertionErrors.assertTrue;
|
|||||||
* @deprecated The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
* @deprecated The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class RemoteTransformerClientTest
|
public class RemoteTransformerClientTest
|
||||||
{
|
{
|
||||||
public static final int STARTUP_RETRY_PERIOD_SECONDS = 2;
|
public static final int STARTUP_RETRY_PERIOD_SECONDS = 2;
|
||||||
|
@@ -45,8 +45,10 @@ import org.alfresco.service.cmr.dictionary.TypeDefinition;
|
|||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.util.ThreadPoolExecutorFactoryBean;
|
import org.alfresco.util.ThreadPoolExecutorFactoryBean;
|
||||||
import org.alfresco.util.cache.DefaultAsynchronouslyRefreshedCacheRegistry;
|
import org.alfresco.util.cache.DefaultAsynchronouslyRefreshedCacheRegistry;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.extensions.surf.util.I18NUtil;
|
import org.springframework.extensions.surf.util.I18NUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,6 +56,7 @@ import org.springframework.extensions.surf.util.I18NUtil;
|
|||||||
* @author sglover
|
* @author sglover
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class DictionaryDAOTest
|
public class DictionaryDAOTest
|
||||||
{
|
{
|
||||||
public static final String TEST_RESOURCE_MESSAGES = "alfresco/messages/dictionary-messages";
|
public static final String TEST_RESOURCE_MESSAGES = "alfresco/messages/dictionary-messages";
|
||||||
|
@@ -39,8 +39,10 @@ import org.alfresco.repo.tenant.TenantUtil.TenantRunAsWork;
|
|||||||
import org.alfresco.util.DynamicallySizedThreadPoolExecutor;
|
import org.alfresco.util.DynamicallySizedThreadPoolExecutor;
|
||||||
import org.alfresco.util.TraceableThreadFactory;
|
import org.alfresco.util.TraceableThreadFactory;
|
||||||
import org.alfresco.util.cache.DefaultAsynchronouslyRefreshedCacheRegistry;
|
import org.alfresco.util.cache.DefaultAsynchronouslyRefreshedCacheRegistry;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.extensions.surf.util.I18NUtil;
|
import org.springframework.extensions.surf.util.I18NUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,6 +50,7 @@ import org.springframework.extensions.surf.util.I18NUtil;
|
|||||||
* @author sglover
|
* @author sglover
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Category (NeverRunsTests.class)
|
||||||
public class DictionaryLoadDAOTest
|
public class DictionaryLoadDAOTest
|
||||||
{
|
{
|
||||||
public static final String TEST_RESOURCE_MESSAGES = "alfresco/messages/dictionary-messages";
|
public static final String TEST_RESOURCE_MESSAGES = "alfresco/messages/dictionary-messages";
|
||||||
|
@@ -50,6 +50,8 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
import org.alfresco.util.EqualsHelper;
|
import org.alfresco.util.EqualsHelper;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -60,6 +62,7 @@ import org.springframework.context.ApplicationContext;
|
|||||||
* @author Derek Hulley
|
* @author Derek Hulley
|
||||||
* @since 3.4
|
* @since 3.4
|
||||||
*/
|
*/
|
||||||
|
@Category (NeverRunsTests.class)
|
||||||
public class NodePropertyHelperTest extends TestCase
|
public class NodePropertyHelperTest extends TestCase
|
||||||
{
|
{
|
||||||
private static final QName QN_BOOLEAN = createQName("boolean");
|
private static final QName QN_BOOLEAN = createQName("boolean");
|
||||||
|
@@ -41,10 +41,11 @@ import org.alfresco.service.cmr.subscriptions.SubscriptionItemTypeEnum;
|
|||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
|
|
||||||
@Category(OwnJVMTestsCategory.class)
|
@Category({OwnJVMTestsCategory.class, NeverRunsTests.class})
|
||||||
public class SubscriptionDAOTest extends TestCase
|
public class SubscriptionDAOTest extends TestCase
|
||||||
{
|
{
|
||||||
private ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
|
private ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
|
||||||
|
@@ -25,16 +25,16 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.repo.imap;
|
package org.alfresco.repo.imap;
|
||||||
|
|
||||||
|
import javax.mail.Flags;
|
||||||
|
import javax.transaction.UserTransaction;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.mail.Flags;
|
import com.icegreen.greenmail.store.SimpleStoredMessage;
|
||||||
import javax.transaction.UserTransaction;
|
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.repo.importer.ACPImportPackageHandler;
|
import org.alfresco.repo.importer.ACPImportPackageHandler;
|
||||||
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory;
|
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory;
|
||||||
@@ -55,13 +55,14 @@ import org.alfresco.service.transaction.TransactionService;
|
|||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
import org.alfresco.util.PropertyMap;
|
import org.alfresco.util.PropertyMap;
|
||||||
import org.alfresco.util.config.RepositoryFolderConfigBean;
|
import org.alfresco.util.config.RepositoryFolderConfigBean;
|
||||||
|
import org.alfresco.util.testing.category.PerformanceTests;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
|
|
||||||
import com.icegreen.greenmail.store.SimpleStoredMessage;
|
@Category(PerformanceTests.class)
|
||||||
|
|
||||||
public class LoadTester extends TestCase
|
public class LoadTester extends TestCase
|
||||||
{
|
{
|
||||||
private Log logger = LogFactory.getLog(LoadTester.class);
|
private Log logger = LogFactory.getLog(LoadTester.class);
|
||||||
|
@@ -41,11 +41,14 @@ import javax.mail.Store;
|
|||||||
import javax.mail.internet.MimeMultipart;
|
import javax.mail.internet.MimeMultipart;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
import org.alfresco.util.testing.category.PerformanceTests;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
|
|
||||||
import com.sun.mail.util.BASE64DecoderStream;
|
import com.sun.mail.util.BASE64DecoderStream;
|
||||||
|
|
||||||
|
@Category(PerformanceTests.class)
|
||||||
public class RemoteLoadTester extends TestCase
|
public class RemoteLoadTester extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@@ -26,12 +26,16 @@
|
|||||||
|
|
||||||
package org.alfresco.repo.invitation;
|
package org.alfresco.repo.invitation;
|
||||||
|
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test InvitationService with both engines enabled.
|
* Test InvitationService with both engines enabled.
|
||||||
*
|
*
|
||||||
* @author Nick Smith
|
* @author Nick Smith
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class FullInvitationServiceImplTests extends AbstractInvitationServiceImplTest
|
public class FullInvitationServiceImplTests extends AbstractInvitationServiceImplTest
|
||||||
{
|
{
|
||||||
// See inherited tests.
|
// See inherited tests.
|
||||||
|
@@ -50,11 +50,14 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
import org.alfresco.util.PropertyMap;
|
import org.alfresco.util.PropertyMap;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ConfigurableApplicationContext;
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
import org.springframework.extensions.surf.util.I18NUtil;
|
import org.springframework.extensions.surf.util.I18NUtil;
|
||||||
|
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class MetadataEncryptorTests extends TestCase
|
public class MetadataEncryptorTests extends TestCase
|
||||||
{
|
{
|
||||||
private static final String TEST_MODEL = "org/alfresco/repo/node/encrypted_prop_model.xml";
|
private static final String TEST_MODEL = "org/alfresco/repo/node/encrypted_prop_model.xml";
|
||||||
|
@@ -47,6 +47,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||||
import org.alfresco.util.BaseAlfrescoTestCase;
|
import org.alfresco.util.BaseAlfrescoTestCase;
|
||||||
import org.alfresco.util.GUID;
|
import org.alfresco.util.GUID;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
@@ -57,7 +58,7 @@ import org.junit.experimental.categories.Category;
|
|||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
@Category(OwnJVMTestsCategory.class)
|
@Category({OwnJVMTestsCategory.class, NeverRunsTests.class})
|
||||||
public class NotificationServiceImplSystemTest extends BaseAlfrescoTestCase
|
public class NotificationServiceImplSystemTest extends BaseAlfrescoTestCase
|
||||||
{
|
{
|
||||||
private static final String FROM_USER = "fromUser" + GUID.generate();
|
private static final String FROM_USER = "fromUser" + GUID.generate();
|
||||||
|
@@ -51,6 +51,8 @@ import org.alfresco.service.cmr.repository.ContentService;
|
|||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.mockito.ArgumentCaptor;
|
import org.mockito.ArgumentCaptor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,6 +61,7 @@ import org.mockito.ArgumentCaptor;
|
|||||||
* @deprecated We are introducing the new async RenditionService2.
|
* @deprecated We are introducing the new async RenditionService2.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class AbstractRenderingEngineTest extends TestCase
|
public class AbstractRenderingEngineTest extends TestCase
|
||||||
{
|
{
|
||||||
private final NodeRef source = new NodeRef("http://test/sourceId");
|
private final NodeRef source = new NodeRef("http://test/sourceId");
|
||||||
|
@@ -31,10 +31,12 @@ import org.alfresco.service.cmr.repository.ContentData;
|
|||||||
import org.alfresco.service.cmr.repository.ContentReader;
|
import org.alfresco.service.cmr.repository.ContentReader;
|
||||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -50,6 +52,7 @@ import static org.alfresco.model.ContentModel.PROP_CONTENT;
|
|||||||
/**
|
/**
|
||||||
* Integration tests for {@link LocalSynchronousTransformClient}
|
* Integration tests for {@link LocalSynchronousTransformClient}
|
||||||
*/
|
*/
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class LocalSynchronousTransformClientIntegrationTest extends AbstractRenditionIntegrationTest
|
public class LocalSynchronousTransformClientIntegrationTest extends AbstractRenditionIntegrationTest
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@@ -32,6 +32,7 @@ import org.alfresco.repo.rawevents.types.OnContentUpdatePolicyEvent;
|
|||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.apache.camel.CamelContext;
|
import org.apache.camel.CamelContext;
|
||||||
import org.apache.camel.Exchange;
|
import org.apache.camel.Exchange;
|
||||||
import org.apache.camel.Message;
|
import org.apache.camel.Message;
|
||||||
@@ -39,6 +40,7 @@ import org.apache.camel.support.DefaultExchange;
|
|||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.junit.rules.TestName;
|
import org.junit.rules.TestName;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
import org.mockito.junit.MockitoJUnit;
|
import org.mockito.junit.MockitoJUnit;
|
||||||
@@ -53,6 +55,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|||||||
*
|
*
|
||||||
* @author Cristian Turlica
|
* @author Cristian Turlica
|
||||||
*/
|
*/
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class RenditionEventProcessorTest
|
public class RenditionEventProcessorTest
|
||||||
{
|
{
|
||||||
private RenditionEventProcessor renditionEventProcessor;
|
private RenditionEventProcessor renditionEventProcessor;
|
||||||
|
@@ -62,7 +62,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
public class BaseRuleTest extends BaseSpringTest
|
public abstract class BaseRuleTest extends BaseSpringTest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Data used in the tests
|
* Data used in the tests
|
||||||
|
@@ -77,6 +77,7 @@ import org.alfresco.service.transaction.TransactionService;
|
|||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
import org.alfresco.util.CachingDateFormat;
|
import org.alfresco.util.CachingDateFormat;
|
||||||
import org.alfresco.util.testing.category.LuceneTests;
|
import org.alfresco.util.testing.category.LuceneTests;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
@@ -90,7 +91,7 @@ import org.springframework.extensions.surf.util.I18NUtil;
|
|||||||
* @author Andy
|
* @author Andy
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Category(LuceneTests.class)
|
@Category({LuceneTests.class, NeverRunsTests.class})
|
||||||
public class DBQueryTest implements DictionaryListener
|
public class DBQueryTest implements DictionaryListener
|
||||||
{
|
{
|
||||||
protected static ApplicationContext ctx = null;
|
protected static ApplicationContext ctx = null;
|
||||||
|
@@ -59,6 +59,7 @@ import org.alfresco.service.transaction.TransactionService;
|
|||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
import org.alfresco.util.ScriptPagingDetails;
|
import org.alfresco.util.ScriptPagingDetails;
|
||||||
import org.alfresco.util.testing.category.LuceneTests;
|
import org.alfresco.util.testing.category.LuceneTests;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
|
|
||||||
@@ -66,7 +67,7 @@ import org.springframework.context.ApplicationContext;
|
|||||||
* Tests for the Script wrapper for the Authority Service,
|
* Tests for the Script wrapper for the Authority Service,
|
||||||
* ScriptAuthorityService
|
* ScriptAuthorityService
|
||||||
*/
|
*/
|
||||||
@Category(LuceneTests.class)
|
@Category({LuceneTests.class, NeverRunsTests.class})
|
||||||
public class ScriptAuthorityServiceTest extends TestCase
|
public class ScriptAuthorityServiceTest extends TestCase
|
||||||
{
|
{
|
||||||
private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
|
private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
|
||||||
|
@@ -64,7 +64,7 @@ import org.alfresco.service.transaction.TransactionService;
|
|||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
|
|
||||||
public class AbstractPermissionTest extends TestCase
|
public abstract class AbstractPermissionTest extends TestCase
|
||||||
{
|
{
|
||||||
protected static final String USER2_LEMUR = "lemur";
|
protected static final String USER2_LEMUR = "lemur";
|
||||||
|
|
||||||
|
@@ -70,7 +70,7 @@ import org.springframework.context.ApplicationContext;
|
|||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
@Category(LuceneTests.class)
|
@Category(LuceneTests.class)
|
||||||
public class AbstractReadPermissionTest extends TestCase
|
public abstract class AbstractReadPermissionTest extends TestCase
|
||||||
{
|
{
|
||||||
protected static ApplicationContext applicationContext = ApplicationContextHelper.getApplicationContext();
|
protected static ApplicationContext applicationContext = ApplicationContextHelper.getApplicationContext();
|
||||||
|
|
||||||
|
@@ -40,7 +40,9 @@ import org.alfresco.util.ApplicationContextHelper;
|
|||||||
import org.alfresco.util.BaseAlfrescoSpringTest;
|
import org.alfresco.util.BaseAlfrescoSpringTest;
|
||||||
import org.alfresco.util.Pair;
|
import org.alfresco.util.Pair;
|
||||||
import org.alfresco.util.PropertyMap;
|
import org.alfresco.util.PropertyMap;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -52,6 +54,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
@Transactional
|
@Transactional
|
||||||
@ContextConfiguration({"classpath:alfresco/application-context.xml",
|
@ContextConfiguration({"classpath:alfresco/application-context.xml",
|
||||||
"classpath:org/alfresco/repo/site/site-custom-context.xml"})
|
"classpath:org/alfresco/repo/site/site-custom-context.xml"})
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class CustomRoleTest extends BaseAlfrescoSpringTest
|
public class CustomRoleTest extends BaseAlfrescoSpringTest
|
||||||
{
|
{
|
||||||
private static final String USER_ONE = "UserOne_CustomRoleTest";
|
private static final String USER_ONE = "UserOne_CustomRoleTest";
|
||||||
|
@@ -47,11 +47,13 @@ import org.alfresco.service.cmr.site.SiteVisibility;
|
|||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
import org.alfresco.util.PropertyMap;
|
import org.alfresco.util.PropertyMap;
|
||||||
|
import org.alfresco.util.testing.category.PerformanceTests;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.AfterClass;
|
import org.junit.AfterClass;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,6 +61,7 @@ import org.springframework.context.ApplicationContext;
|
|||||||
*
|
*
|
||||||
* @author Alan Davis
|
* @author Alan Davis
|
||||||
*/
|
*/
|
||||||
|
@Category(PerformanceTests.class)
|
||||||
public class SiteServiceTestHuge
|
public class SiteServiceTestHuge
|
||||||
{
|
{
|
||||||
private enum Allocation
|
private enum Allocation
|
||||||
|
@@ -55,6 +55,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
import org.alfresco.util.testing.category.LuceneTests;
|
import org.alfresco.util.testing.category.LuceneTests;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
|
|
||||||
@@ -64,7 +65,7 @@ import org.springframework.context.ApplicationContext;
|
|||||||
* @author Alfresco
|
* @author Alfresco
|
||||||
* @since 4.2.1
|
* @since 4.2.1
|
||||||
*/
|
*/
|
||||||
@Category({OwnJVMTestsCategory.class, LuceneTests.class})
|
@Category({OwnJVMTestsCategory.class, LuceneTests.class, NeverRunsTests.class})
|
||||||
public class AbstractTenantRoutingContentStoreTest extends TestCase
|
public class AbstractTenantRoutingContentStoreTest extends TestCase
|
||||||
{
|
{
|
||||||
private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
|
private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
|
||||||
|
@@ -51,13 +51,14 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Dmitry Velichkevich
|
* @author Dmitry Velichkevich
|
||||||
*/
|
*/
|
||||||
@Category(OwnJVMTestsCategory.class)
|
@Category({OwnJVMTestsCategory.class, NeverRunsTests.class})
|
||||||
public class VersionableAspectTest extends TestCase
|
public class VersionableAspectTest extends TestCase
|
||||||
{
|
{
|
||||||
public static final String AUTO_VERSION_KEY = "version.store.enableAutoVersioning";
|
public static final String AUTO_VERSION_KEY = "version.store.enableAutoVersioning";
|
||||||
|
@@ -72,8 +72,10 @@ import org.alfresco.service.cmr.workflow.WorkflowDefinition;
|
|||||||
import org.alfresco.service.cmr.workflow.WorkflowDeployment;
|
import org.alfresco.service.cmr.workflow.WorkflowDeployment;
|
||||||
import org.alfresco.service.namespace.NamespaceService;
|
import org.alfresco.service.namespace.NamespaceService;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.mockito.Mockito;
|
import org.mockito.Mockito;
|
||||||
import org.mockito.invocation.InvocationOnMock;
|
import org.mockito.invocation.InvocationOnMock;
|
||||||
@@ -93,6 +95,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
"classpath:activiti/test-activiti-component-context.xml",
|
"classpath:activiti/test-activiti-component-context.xml",
|
||||||
"classpath:alfresco/activiti-context.xml"})
|
"classpath:alfresco/activiti-context.xml"})
|
||||||
@Transactional
|
@Transactional
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class AbstractActivitiComponentTest
|
public class AbstractActivitiComponentTest
|
||||||
{
|
{
|
||||||
protected static final String TEST_GROUP = "GROUP_testGroup";
|
protected static final String TEST_GROUP = "GROUP_testGroup";
|
||||||
|
@@ -36,12 +36,15 @@ import org.activiti.engine.RepositoryService;
|
|||||||
import org.activiti.engine.RuntimeService;
|
import org.activiti.engine.RuntimeService;
|
||||||
import org.activiti.engine.repository.Deployment;
|
import org.activiti.engine.repository.Deployment;
|
||||||
import org.activiti.engine.runtime.ProcessInstance;
|
import org.activiti.engine.runtime.ProcessInstance;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Nick Smith
|
* @author Nick Smith
|
||||||
* @since 3.4.e
|
* @since 3.4.e
|
||||||
*/
|
*/
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class ActivitiSmokeTest extends TestCase
|
public class ActivitiSmokeTest extends TestCase
|
||||||
{
|
{
|
||||||
public void testDeploy() throws Exception
|
public void testDeploy() throws Exception
|
||||||
|
@@ -48,7 +48,9 @@ import org.alfresco.service.namespace.NamespaceService;
|
|||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
import org.springframework.context.ConfigurableApplicationContext;
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
|
|
||||||
@@ -56,6 +58,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
|||||||
* @author Nick Smith
|
* @author Nick Smith
|
||||||
* @since 3.4.e
|
* @since 3.4.e
|
||||||
*/
|
*/
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class ActivitiSpringTest extends TestCase
|
public class ActivitiSpringTest extends TestCase
|
||||||
{
|
{
|
||||||
private static final QName PROP_CHECK_VALUE = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "check_value");
|
private static final QName PROP_CHECK_VALUE = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "check_value");
|
||||||
|
@@ -57,15 +57,18 @@ import org.alfresco.service.cmr.workflow.WorkflowTask;
|
|||||||
import org.alfresco.service.cmr.workflow.WorkflowTaskQuery;
|
import org.alfresco.service.cmr.workflow.WorkflowTaskQuery;
|
||||||
import org.alfresco.service.cmr.workflow.WorkflowTaskState;
|
import org.alfresco.service.cmr.workflow.WorkflowTaskState;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Nick Smith
|
* @author Nick Smith
|
||||||
* @author Frederik Heremans
|
* @author Frederik Heremans
|
||||||
* @since 3.4.e
|
* @since 3.4.e
|
||||||
*/
|
*/
|
||||||
|
@Category(NeverRunsTests.class)
|
||||||
public class ActivitiTaskComponentTest extends AbstractActivitiComponentTest
|
public class ActivitiTaskComponentTest extends AbstractActivitiComponentTest
|
||||||
{
|
{
|
||||||
private WorkflowDefinition workflowDef;
|
private WorkflowDefinition workflowDef;
|
||||||
|
@@ -29,12 +29,13 @@ import org.alfresco.service.cmr.repository.NodeService;
|
|||||||
import org.alfresco.service.cmr.repository.StoreRef;
|
import org.alfresco.service.cmr.repository.StoreRef;
|
||||||
import org.alfresco.test_category.BaseSpringTestsCategory;
|
import org.alfresco.test_category.BaseSpringTestsCategory;
|
||||||
import org.alfresco.util.BaseSpringTest;
|
import org.alfresco.util.BaseSpringTest;
|
||||||
|
import org.alfresco.util.testing.category.NeverRunsTests;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
*/
|
*/
|
||||||
@Category(BaseSpringTestsCategory.class)
|
@Category({BaseSpringTestsCategory.class, NeverRunsTests.class})
|
||||||
public class OutputSpacesStoreSystemTest extends BaseSpringTest
|
public class OutputSpacesStoreSystemTest extends BaseSpringTest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@@ -0,0 +1,191 @@
|
|||||||
|
/*
|
||||||
|
* #%L
|
||||||
|
* Alfresco Repository
|
||||||
|
* %%
|
||||||
|
* Copyright (C) 2005 - 2020 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.util.test;
|
||||||
|
|
||||||
|
import static java.util.Collections.emptySet;
|
||||||
|
import static java.util.stream.Collectors.toSet;
|
||||||
|
|
||||||
|
import static junit.framework.TestCase.assertEquals;
|
||||||
|
|
||||||
|
import java.lang.reflect.Modifier;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
|
import com.google.common.collect.Sets.SetView;
|
||||||
|
|
||||||
|
import junit.framework.TestCase;
|
||||||
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
|
import org.alfresco.util.testing.category.NonBuildTests;
|
||||||
|
import org.junit.After;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
|
import org.junit.runners.Suite.SuiteClasses;
|
||||||
|
import org.reflections.Reflections;
|
||||||
|
import org.reflections.scanners.MethodAnnotationsScanner;
|
||||||
|
import org.reflections.scanners.SubTypesScanner;
|
||||||
|
import org.reflections.scanners.TypeAnnotationsScanner;
|
||||||
|
|
||||||
|
public class OmittedTestClassFinderUnitTest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Test to look for tests which are unintentionally skipped by our CI.
|
||||||
|
* <p>
|
||||||
|
* In particular we look for classes that contain @Test methods or extend TestCase and which are not referenced by TestSuites. There
|
||||||
|
* are a few subtleties to this:
|
||||||
|
* <ul>
|
||||||
|
* <li>alfresco-core and alfresco-data-model don't use test suites, and some @Test methods are executed via inheritance;</li>
|
||||||
|
* <li>some tests are explicitly marked as NonBuildTests;</li>
|
||||||
|
* <li>we assume that all test suite classes have names ending in "TestSuite".</li>
|
||||||
|
* </ul>
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void checkTestClassesReferencedInTestSuites()
|
||||||
|
{
|
||||||
|
// We assume that all of our tests are in org.alfresco.
|
||||||
|
Reflections reflections = new Reflections("org.alfresco", new MethodAnnotationsScanner(), new TypeAnnotationsScanner(), new SubTypesScanner());
|
||||||
|
|
||||||
|
// Find the test classes which are not in test suites.
|
||||||
|
Set<String> testClasses = getTestClassesOnPath(reflections);
|
||||||
|
Set<String> classesReferencedByTestSuites = getClassesReferencedByTestSuites(reflections);
|
||||||
|
SetView<String> unreferencedTests = Sets.difference(testClasses, classesReferencedByTestSuites);
|
||||||
|
|
||||||
|
// Filter out tests which are in Maven modules that don't use test suites (alfresco-core and alfresco-data-model).
|
||||||
|
// Also filter any test classes contained in test dependencies (*.jar).
|
||||||
|
Set<Class> unreferencedTestClasses = unreferencedTests.stream()
|
||||||
|
.map(this::classFromCanonicalName)
|
||||||
|
.filter(clazz -> {
|
||||||
|
String path = clazz.getProtectionDomain().getCodeSource().getLocation().getPath();
|
||||||
|
return !path.endsWith("/data-model/target/test-classes/")
|
||||||
|
&& !path.endsWith("/core/target/test-classes/")
|
||||||
|
&& !path.endsWith(".jar");
|
||||||
|
})
|
||||||
|
.collect(toSet());
|
||||||
|
|
||||||
|
System.out.println("Unreferenced test class count: " + unreferencedTestClasses.size());
|
||||||
|
unreferencedTestClasses.forEach(System.out::println);
|
||||||
|
|
||||||
|
assertEquals("Found test classes which are not referenced by any test suite.", emptySet(), unreferencedTestClasses);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find all test classes. We define a class to be a test class if it contains a Test, Before or After annotation, is not a test suite,
|
||||||
|
* is not abstract and is not a "non-build" test (e.g. the test class is marked as a performance test).
|
||||||
|
* @param reflections The Reflections object used to provide information about the classes.
|
||||||
|
* @return A set of canonical names for the test classes.
|
||||||
|
*/
|
||||||
|
private Set<String> getTestClassesOnPath(Reflections reflections)
|
||||||
|
{
|
||||||
|
Set<String> classesWithTestAnnotations = Stream.of(Test.class, Before.class, After.class)
|
||||||
|
.map(annotation -> findClassesWithMethodAnnotation(reflections, annotation))
|
||||||
|
.flatMap(Set::stream)
|
||||||
|
.collect(toSet());
|
||||||
|
|
||||||
|
Set<String> classesExtendingTestCase = reflections.getSubTypesOf(TestCase.class).stream().map(testClass -> testClass.getCanonicalName()).collect(toSet());
|
||||||
|
|
||||||
|
return Sets.union(classesWithTestAnnotations, classesExtendingTestCase).stream()
|
||||||
|
// Exclude test suite classes.
|
||||||
|
.filter(className -> !className.endsWith("Suite"))
|
||||||
|
// Exclude abstract classes.
|
||||||
|
.filter(className -> !Modifier.isAbstract(classFromCanonicalName(className).getModifiers()))
|
||||||
|
// Exclude test classes which are explicitly marked as "non-build" test classes.
|
||||||
|
.filter(className -> !markedAsNonBuildTest(classFromCanonicalName(className)))
|
||||||
|
.collect(toSet());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Several tests are intentionally excluded from the build. These are marked with the {@link Category} annotation referencing an
|
||||||
|
* interface that extends {@link NonBuildTests}. This is useful for e.g. performance testing or to help with debugging.
|
||||||
|
* @param clazz The test class to check.
|
||||||
|
* @return true if the test class has been marked with a NonBuildTests category.
|
||||||
|
*/
|
||||||
|
private boolean markedAsNonBuildTest(Class<?> clazz)
|
||||||
|
{
|
||||||
|
Category category = clazz.getAnnotation(Category.class);
|
||||||
|
if (category == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return Arrays.stream(category.value())
|
||||||
|
.anyMatch(value -> NonBuildTests.class.isAssignableFrom(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all the test classes referenced from test suites.
|
||||||
|
* @param reflections The Reflections object used to provide information about the classes.
|
||||||
|
* @return The set of canonical names of test classes referenced by test suites.
|
||||||
|
*/
|
||||||
|
private Set<String> getClassesReferencedByTestSuites(Reflections reflections)
|
||||||
|
{
|
||||||
|
Set<String> classesReferencedByTestSuites = new HashSet<>();
|
||||||
|
for (Class testSuite : reflections.getTypesAnnotatedWith(SuiteClasses.class))
|
||||||
|
{
|
||||||
|
SuiteClasses testSuiteAnnotation = (SuiteClasses) testSuite.getAnnotation(SuiteClasses.class);
|
||||||
|
Arrays.stream(testSuiteAnnotation.value())
|
||||||
|
.map(testClass -> testClass.getCanonicalName())
|
||||||
|
// Exclude nested test suite classes.
|
||||||
|
.filter(className -> !className.endsWith("Suite"))
|
||||||
|
.forEach(classesReferencedByTestSuites::add);
|
||||||
|
}
|
||||||
|
return classesReferencedByTestSuites;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find the names of classes with the given annotation.
|
||||||
|
* @param reflections The Reflections object used to provide information about the classes.
|
||||||
|
* @param annotation The class of the annotation to look for.
|
||||||
|
* @return The set of canonical names of classes containing methods annotated with the annotation.
|
||||||
|
*/
|
||||||
|
private Set<String> findClassesWithMethodAnnotation(Reflections reflections, Class annotation)
|
||||||
|
{
|
||||||
|
return reflections.getStore()
|
||||||
|
.get(MethodAnnotationsScanner.class, annotation.getName())
|
||||||
|
.stream()
|
||||||
|
// Get the class name from the method name.
|
||||||
|
.map(methodName -> methodName.split("\\.[^\\.]+\\(")[0])
|
||||||
|
.collect(toSet());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find the Class corresponding to a canonical class name.
|
||||||
|
* @param name The name of the class.
|
||||||
|
* @return The Class object.
|
||||||
|
*/
|
||||||
|
private Class<?> classFromCanonicalName(String name)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return Class.forName(name, false, getClass().getClassLoader());
|
||||||
|
}
|
||||||
|
catch (ClassNotFoundException e)
|
||||||
|
{
|
||||||
|
throw new AlfrescoRuntimeException("Couldn't find test class for name.", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user