persons = mockUserRegistry.getPersons(modifiedSince);
return !persons.isEmpty() ? persons : super.getPersons(modifiedSince);
}
@@ -837,124 +840,124 @@ public class ChainingUserRegistrySynchronizerTest extends TestCase
{
tearDownTestUsersAndGroups();
}
- }
-
- /**
- * Test that upon a first sync, the missing properties at the AD level are set as 'null' on the Alfresco Person object.
- * MNT-14026: LDAP sync fails to update attribute's value deletion.
- */
- public void testSyncInexistentProperty() throws Exception
- {
- try
- {
- // Execute an LDAP sync where the AD server returns the attributes of a person without a certain property, in this case the 'mail'.
- executeMockedLDAPSyncWithoutActiveDirectoryEmailProp();
-
- Map userProperties = this.nodeService.getProperties(this.personService.getPerson("U1"));
- assertTrue("User must have the email property even though it's null", userProperties.containsKey(ContentModel.PROP_EMAIL));
- assertTrue("User's email must be null on first sync.", userProperties.get(ContentModel.PROP_EMAIL) == null);
- }
- finally
- {
- tearDownTestUsersAndGroups();
- }
- }
-
- /**
- * Test that an attribute is also removed on the Alfresco side, when it's removed at the AD level.
- * MNT-14026: LDAP sync fails to update attribute's value deletion.
- */
- public void testSyncDeletedProperty() throws Exception
- {
- try
- {
- // Execute an LDAP sync where the AD server returns the attributes of a person, including the 'mail' property.
- executeMockedLDAPSyncWithActiveDirectoryEmailProp();
-
- Map userProperties = this.nodeService.getProperties(this.personService.getPerson("U1"));
- assertTrue("User's email must be not null.", userProperties.get(ContentModel.PROP_EMAIL).equals("U1@alfresco.com"));
-
- // Execute an LDAP sync where the AD server returns the attributes
- // of a person without the 'mail' property, because it was deleted.
- executeMockedLDAPSyncWithoutActiveDirectoryEmailProp();
-
- userProperties = this.nodeService.getProperties(this.personService.getPerson("U1"));
- assertTrue("User must have the email property even though it's null", userProperties.containsKey(ContentModel.PROP_EMAIL));
- assertTrue("User's email must be null on a 2rd sync, since the email property was removed at the AD level.", userProperties.get(ContentModel.PROP_EMAIL) == null);
- }
- finally
- {
- tearDownTestUsersAndGroups();
- }
- }
-
- private void executeMockedLDAPSyncWithActiveDirectoryEmailProp() throws Exception
- {
- executeMockedLDAPSync(true);
- }
-
- private void executeMockedLDAPSyncWithoutActiveDirectoryEmailProp() throws Exception
- {
- executeMockedLDAPSync(false);
- }
-
- private void executeMockedLDAPSync(boolean withEmail) throws NamingException, Exception
- {
- MockUserRegistry mockUserRegistry = new MockUserRegistry("Z0", new NodeDescription[] {}, new NodeDescription[] {});
-
- MockLDAPUserRegistry mockLDAPUserRegistry = new MockLDAPUserRegistry(mockUserRegistry);
-
- LDAPInitialDirContextFactoryImpl mockedLdapInitialDirContextFactory = getMockedLDAPSearchResult(withEmail);
-
- mockLDAPUserRegistry.setLDAPInitialDirContextFactory(mockedLdapInitialDirContextFactory);
- mockLDAPUserRegistry.setEnableProgressEstimation(false);
- mockLDAPUserRegistry.setUserIdAttributeName("sAMAccountName");
- Map personAttributeMapping = getMockedLdapAttributeMapping();
- mockLDAPUserRegistry.setPersonAttributeMapping(personAttributeMapping);
- mockLDAPUserRegistry.setNamespaceService(this.namespaceService);
-
- mockLDAPUserRegistry.afterPropertiesSet();
-
- this.applicationContextManager.setUserRegistries(mockLDAPUserRegistry);
-
- ChainingUserRegistrySynchronizer chainingSynchronizer = (ChainingUserRegistrySynchronizer) this.synchronizer;
-
- chainingSynchronizer.synchronize(false, false);
- }
-
- private LDAPInitialDirContextFactoryImpl getMockedLDAPSearchResult(boolean withEmail) throws NamingException
- {
- @SuppressWarnings("unchecked")
- NamingEnumeration mockedNamingEnumeration = mock(NamingEnumeration.class);
- when(mockedNamingEnumeration.hasMore()).thenReturn(true).thenReturn(false);
-
- BasicAttributes attributes = new BasicAttributes();
- attributes.put(new BasicAttribute("sAMAccountName", "U1"));
- attributes.put(new BasicAttribute("givenName", "U1"));
- if (withEmail)
- {
- attributes.put(new BasicAttribute("mail", "U1@alfresco.com"));
- }
- SearchResult mockedSearchResult = new SearchResult("CN:U1", null, attributes);
- mockedSearchResult.setNameInNamespace("CN:U1");
-
- when(mockedNamingEnumeration.next()).thenReturn(mockedSearchResult);
-
- InitialDirContext mockedInitialDirContext = mock(InitialDirContext.class);
- when(mockedInitialDirContext.search(any(String.class), any(String.class), any(SearchControls.class))).thenReturn(mockedNamingEnumeration);
-
- LDAPInitialDirContextFactoryImpl mockedLdapInitialDirContextFactory = mock(LDAPInitialDirContextFactoryImpl.class);
- when(mockedLdapInitialDirContextFactory.getDefaultIntialDirContext(0)).thenReturn(mockedInitialDirContext);
- return mockedLdapInitialDirContextFactory;
- }
-
- private Map getMockedLdapAttributeMapping()
- {
- Map personAttributeMapping = new HashMap<>();
- personAttributeMapping.put("cm:userName", "sAMAccountName");
- personAttributeMapping.put("cm:firstName", "givenName");
- personAttributeMapping.put("cm:email", "mail");
- return personAttributeMapping;
+ }
+
+ /**
+ * Test that upon a first sync, the missing properties at the AD level are set as 'null' on the Alfresco Person object.
+ * MNT-14026: LDAP sync fails to update attribute's value deletion.
+ */
+ public void testSyncInexistentProperty() throws Exception
+ {
+ try
+ {
+ // Execute an LDAP sync where the AD server returns the attributes of a person without a certain property, in this case the 'mail'.
+ executeMockedLDAPSyncWithoutActiveDirectoryEmailProp();
+
+ Map userProperties = this.nodeService.getProperties(this.personService.getPerson("U1"));
+ assertTrue("User must have the email property even though it's null", userProperties.containsKey(ContentModel.PROP_EMAIL));
+ assertTrue("User's email must be null on first sync.", userProperties.get(ContentModel.PROP_EMAIL) == null);
+ }
+ finally
+ {
+ tearDownTestUsersAndGroups();
+ }
+ }
+
+ /**
+ * Test that an attribute is also removed on the Alfresco side, when it's removed at the AD level.
+ * MNT-14026: LDAP sync fails to update attribute's value deletion.
+ */
+ public void testSyncDeletedProperty() throws Exception
+ {
+ try
+ {
+ // Execute an LDAP sync where the AD server returns the attributes of a person, including the 'mail' property.
+ executeMockedLDAPSyncWithActiveDirectoryEmailProp();
+
+ Map userProperties = this.nodeService.getProperties(this.personService.getPerson("U1"));
+ assertTrue("User's email must be not null.", userProperties.get(ContentModel.PROP_EMAIL).equals("U1@alfresco.com"));
+
+ // Execute an LDAP sync where the AD server returns the attributes
+ // of a person without the 'mail' property, because it was deleted.
+ executeMockedLDAPSyncWithoutActiveDirectoryEmailProp();
+
+ userProperties = this.nodeService.getProperties(this.personService.getPerson("U1"));
+ assertTrue("User must have the email property even though it's null", userProperties.containsKey(ContentModel.PROP_EMAIL));
+ assertTrue("User's email must be null on a 2rd sync, since the email property was removed at the AD level.", userProperties.get(ContentModel.PROP_EMAIL) == null);
+ }
+ finally
+ {
+ tearDownTestUsersAndGroups();
+ }
+ }
+
+ private void executeMockedLDAPSyncWithActiveDirectoryEmailProp() throws Exception
+ {
+ executeMockedLDAPSync(true);
+ }
+
+ private void executeMockedLDAPSyncWithoutActiveDirectoryEmailProp() throws Exception
+ {
+ executeMockedLDAPSync(false);
+ }
+
+ private void executeMockedLDAPSync(boolean withEmail) throws NamingException, Exception
+ {
+ MockUserRegistry mockUserRegistry = new MockUserRegistry("Z0", new NodeDescription[] {}, new NodeDescription[] {});
+
+ MockLDAPUserRegistry mockLDAPUserRegistry = new MockLDAPUserRegistry(mockUserRegistry);
+
+ LDAPInitialDirContextFactoryImpl mockedLdapInitialDirContextFactory = getMockedLDAPSearchResult(withEmail);
+
+ mockLDAPUserRegistry.setLDAPInitialDirContextFactory(mockedLdapInitialDirContextFactory);
+ mockLDAPUserRegistry.setEnableProgressEstimation(false);
+ mockLDAPUserRegistry.setUserIdAttributeName("sAMAccountName");
+ Map personAttributeMapping = getMockedLdapAttributeMapping();
+ mockLDAPUserRegistry.setPersonAttributeMapping(personAttributeMapping);
+ mockLDAPUserRegistry.setNamespaceService(this.namespaceService);
+
+ mockLDAPUserRegistry.afterPropertiesSet();
+
+ this.applicationContextManager.setUserRegistries(mockLDAPUserRegistry);
+
+ ChainingUserRegistrySynchronizer chainingSynchronizer = (ChainingUserRegistrySynchronizer) this.synchronizer;
+
+ chainingSynchronizer.synchronize(false, false);
+ }
+
+ private LDAPInitialDirContextFactoryImpl getMockedLDAPSearchResult(boolean withEmail) throws NamingException
+ {
+ @SuppressWarnings("unchecked")
+ NamingEnumeration mockedNamingEnumeration = mock(NamingEnumeration.class);
+ when(mockedNamingEnumeration.hasMore()).thenReturn(true).thenReturn(false);
+
+ BasicAttributes attributes = new BasicAttributes();
+ attributes.put(new BasicAttribute("sAMAccountName", "U1"));
+ attributes.put(new BasicAttribute("givenName", "U1"));
+ if (withEmail)
+ {
+ attributes.put(new BasicAttribute("mail", "U1@alfresco.com"));
+ }
+ SearchResult mockedSearchResult = new SearchResult("CN:U1", null, attributes);
+ mockedSearchResult.setNameInNamespace("CN:U1");
+
+ when(mockedNamingEnumeration.next()).thenReturn(mockedSearchResult);
+
+ InitialDirContext mockedInitialDirContext = mock(InitialDirContext.class);
+ when(mockedInitialDirContext.search(any(String.class), any(String.class), any(SearchControls.class))).thenReturn(mockedNamingEnumeration);
+
+ LDAPInitialDirContextFactoryImpl mockedLdapInitialDirContextFactory = mock(LDAPInitialDirContextFactoryImpl.class);
+ when(mockedLdapInitialDirContextFactory.getDefaultIntialDirContext(0)).thenReturn(mockedInitialDirContext);
+ return mockedLdapInitialDirContextFactory;
+ }
+
+ private Map getMockedLdapAttributeMapping()
+ {
+ Map personAttributeMapping = new HashMap<>();
+ personAttributeMapping.put("cm:userName", "sAMAccountName");
+ personAttributeMapping.put("cm:firstName", "givenName");
+ personAttributeMapping.put("cm:email", "mail");
+ return personAttributeMapping;
}
/**
diff --git a/src/test/java/org/alfresco/repo/site/SiteServiceImplTest.java b/src/test/java/org/alfresco/repo/site/SiteServiceImplTest.java
index 43be6f9622..597f860254 100644
--- a/src/test/java/org/alfresco/repo/site/SiteServiceImplTest.java
+++ b/src/test/java/org/alfresco/repo/site/SiteServiceImplTest.java
@@ -92,6 +92,7 @@ import org.alfresco.test_category.BaseSpringTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.BaseAlfrescoSpringTest;
import org.alfresco.util.GUID;
+import org.alfresco.util.testing.category.LuceneTests;
import org.junit.experimental.categories.Category;
import org.springframework.extensions.surf.util.I18NUtil;
@@ -103,7 +104,7 @@ import static org.mockito.Mockito.when;
*
* @author Roy Wetherall
*/
-@Category(BaseSpringTestsCategory.class)
+@Category({BaseSpringTestsCategory.class, LuceneTests.class})
public class SiteServiceImplTest extends BaseAlfrescoSpringTest
{
public static final StoreRef SITE_STORE = new StoreRef("workspace://SpacesStore");
diff --git a/src/test/java/org/alfresco/repo/solr/SOLRTrackingComponentTest.java b/src/test/java/org/alfresco/repo/solr/SOLRTrackingComponentTest.java
index 54cdc9eeb9..d94714f43e 100644
--- a/src/test/java/org/alfresco/repo/solr/SOLRTrackingComponentTest.java
+++ b/src/test/java/org/alfresco/repo/solr/SOLRTrackingComponentTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.solr;
import java.io.InputStream;
@@ -65,6 +65,7 @@ import org.alfresco.service.transaction.TransactionService;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.PropertyMap;
+import org.alfresco.util.testing.category.LuceneTests;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.experimental.categories.Category;
@@ -75,7 +76,7 @@ import org.springframework.context.ConfigurableApplicationContext;
*
* @since 4.0
*/
-@Category(OwnJVMTestsCategory.class)
+@Category({OwnJVMTestsCategory.class, LuceneTests.class})
public class SOLRTrackingComponentTest extends TestCase
{
private static final Log logger = LogFactory.getLog(SOLRTrackingComponentTest.class);
diff --git a/src/test/java/org/alfresco/repo/subscriptions/SubscriptionServiceImplTest.java b/src/test/java/org/alfresco/repo/subscriptions/SubscriptionServiceImplTest.java
index 1beb950c36..bd9baf5d20 100644
--- a/src/test/java/org/alfresco/repo/subscriptions/SubscriptionServiceImplTest.java
+++ b/src/test/java/org/alfresco/repo/subscriptions/SubscriptionServiceImplTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.subscriptions;
import javax.transaction.Status;
@@ -51,10 +51,11 @@ import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.GUID;
import org.alfresco.util.PropertyMap;
+import org.alfresco.util.testing.category.LuceneTests;
import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
-@Category(OwnJVMTestsCategory.class)
+@Category({OwnJVMTestsCategory.class, LuceneTests.class})
public class SubscriptionServiceImplTest extends TestCase
{
public static final String[] CONTEXTS = new String[] { "classpath:alfresco/application-context.xml", "classpath:test/alfresco/test-subscriptions-context.xml" };
@@ -78,7 +79,7 @@ public class SubscriptionServiceImplTest extends TestCase
@Override
public void setUp() throws Exception
- {
+ {
ctx = ApplicationContextHelper.getApplicationContext(CONTEXTS);
// Get the required services
transactionService = (TransactionService) ctx.getBean("TransactionService");
diff --git a/src/test/java/org/alfresco/repo/tagging/TaggingServiceImplTest.java b/src/test/java/org/alfresco/repo/tagging/TaggingServiceImplTest.java
index dce52178e9..4a901adf06 100644
--- a/src/test/java/org/alfresco/repo/tagging/TaggingServiceImplTest.java
+++ b/src/test/java/org/alfresco/repo/tagging/TaggingServiceImplTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.tagging;
import java.io.ByteArrayInputStream;
@@ -83,6 +83,7 @@ import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.GUID;
import org.alfresco.util.Pair;
import org.alfresco.util.PropertyMap;
+import org.alfresco.util.testing.category.LuceneTests;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ConfigurableApplicationContext;
@@ -98,7 +99,7 @@ import org.junit.runners.MethodSorters;
* @author Nick Burch
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
-@Category(OwnJVMTestsCategory.class)
+@Category({OwnJVMTestsCategory.class, LuceneTests.class})
public class TaggingServiceImplTest extends TestCase
{
private static ConfigurableApplicationContext ctx =
diff --git a/src/test/java/org/alfresco/repo/tagging/UpdateTagScopesActionExecuterTest.java b/src/test/java/org/alfresco/repo/tagging/UpdateTagScopesActionExecuterTest.java
index b71c62d094..0b9e914fb0 100644
--- a/src/test/java/org/alfresco/repo/tagging/UpdateTagScopesActionExecuterTest.java
+++ b/src/test/java/org/alfresco/repo/tagging/UpdateTagScopesActionExecuterTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.tagging;
import java.io.Serializable;
@@ -54,9 +54,11 @@ import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.tagging.TaggingService;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.ApplicationContextHelper;
+import org.alfresco.util.testing.category.LuceneTests;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
/**
@@ -64,6 +66,7 @@ import org.springframework.context.ApplicationContext;
*
* @author Dmitry Velichkevich
*/
+@Category(LuceneTests.class)
public class UpdateTagScopesActionExecuterTest extends TestCase
{
private static final int TAGSCOPE_LAYERS = 3;
diff --git a/src/test/java/org/alfresco/repo/template/XSLTProcessorTest.java b/src/test/java/org/alfresco/repo/template/XSLTProcessorTest.java
index e332fb85c9..7f65f1a744 100644
--- a/src/test/java/org/alfresco/repo/template/XSLTProcessorTest.java
+++ b/src/test/java/org/alfresco/repo/template/XSLTProcessorTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.template;
@@ -46,6 +46,7 @@ import org.alfresco.test_category.BaseSpringTestsCategory;
import org.alfresco.util.BaseAlfrescoSpringTest;
import org.alfresco.util.GUID;
import org.alfresco.util.XMLUtil;
+import org.alfresco.util.testing.category.LuceneTests;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.experimental.categories.Category;
@@ -54,7 +55,7 @@ import org.junit.experimental.categories.Category;
* @author Brian
*
*/
-@Category(BaseSpringTestsCategory.class)
+@Category({BaseSpringTestsCategory.class, LuceneTests.class})
public class XSLTProcessorTest extends BaseAlfrescoSpringTest
{
private final static Log log = LogFactory.getLog(XSLTProcessorTest.class);
diff --git a/src/test/java/org/alfresco/repo/tenant/AbstractTenantRoutingContentStoreTest.java b/src/test/java/org/alfresco/repo/tenant/AbstractTenantRoutingContentStoreTest.java
index ffe43bb6ec..4ad04c9215 100644
--- a/src/test/java/org/alfresco/repo/tenant/AbstractTenantRoutingContentStoreTest.java
+++ b/src/test/java/org/alfresco/repo/tenant/AbstractTenantRoutingContentStoreTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.tenant;
import java.io.Serializable;
@@ -54,6 +54,7 @@ import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
+import org.alfresco.util.testing.category.LuceneTests;
import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
@@ -63,7 +64,7 @@ import org.springframework.context.ApplicationContext;
* @author Alfresco
* @since 4.2.1
*/
-@Category(OwnJVMTestsCategory.class)
+@Category({OwnJVMTestsCategory.class, LuceneTests.class})
public class AbstractTenantRoutingContentStoreTest extends TestCase
{
private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
diff --git a/src/test/java/org/alfresco/repo/tenant/MultiTDemoTest.java b/src/test/java/org/alfresco/repo/tenant/MultiTDemoTest.java
index a8af439ea7..6593506a09 100644
--- a/src/test/java/org/alfresco/repo/tenant/MultiTDemoTest.java
+++ b/src/test/java/org/alfresco/repo/tenant/MultiTDemoTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.tenant;
import java.io.InputStream;
@@ -89,6 +89,7 @@ import org.alfresco.service.namespace.QName;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
+import org.alfresco.util.testing.category.LuceneTests;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.FixMethodOrder;
@@ -102,7 +103,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
* since 3.0
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
-@Category(OwnJVMTestsCategory.class)
+@Category({OwnJVMTestsCategory.class, LuceneTests.class})
public class MultiTDemoTest extends TestCase
{
private static Log logger = LogFactory.getLog(MultiTDemoTest.class);
@@ -181,7 +182,7 @@ public class MultiTDemoTest extends TestCase
@Override
protected void setUp() throws Exception
{
- super.setUp();
+ super.setUp();
ctx = ApplicationContextHelper.getApplicationContext(new String[] { ApplicationContextHelper.CONFIG_LOCATIONS[0], "classpath:tenant/mt-*context.xml" });
nodeService = (NodeService) ctx.getBean("NodeService");
diff --git a/src/test/java/org/alfresco/repo/transfer/NodeCrawlerTest.java b/src/test/java/org/alfresco/repo/transfer/NodeCrawlerTest.java
index 63ccee721f..d3b5530e5c 100644
--- a/src/test/java/org/alfresco/repo/transfer/NodeCrawlerTest.java
+++ b/src/test/java/org/alfresco/repo/transfer/NodeCrawlerTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.transfer;
import java.io.Serializable;
@@ -48,6 +48,7 @@ import org.alfresco.test_category.BaseSpringTestsCategory;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.BaseAlfrescoSpringTest;
import org.alfresco.util.GUID;
+import org.alfresco.util.testing.category.LuceneTests;
import org.junit.experimental.categories.Category;
/**
@@ -55,7 +56,7 @@ import org.junit.experimental.categories.Category;
*
* @author Brian Remmington
*/
-@Category(BaseSpringTestsCategory.class)
+@Category({BaseSpringTestsCategory.class, LuceneTests.class})
public class NodeCrawlerTest extends BaseAlfrescoSpringTest
{
private ServiceRegistry serviceRegistry;
@@ -192,14 +193,14 @@ public class NodeCrawlerTest extends BaseAlfrescoSpringTest
crawler.setNodeFilters(new ContentClassFilter(ContentModel.TYPE_FOLDER));
crawledNodes = crawler.crawl(node8);
assertEquals(6, crawledNodes.size());
- }
-
- /**
- * @param parent NodeRef
- * @param nodeType QName
- * @return
- */
- private NodeRef makeNode(NodeRef parent, QName nodeType)
+ }
+
+ /**
+ * @param parent NodeRef
+ * @param nodeType QName
+ * @return
+ */
+ private NodeRef makeNode(NodeRef parent, QName nodeType)
{
String uuid = GUID.generate();
Map props = new HashMap();
diff --git a/src/test/java/org/alfresco/repo/transfer/RepoTransferReceiverImplTest.java b/src/test/java/org/alfresco/repo/transfer/RepoTransferReceiverImplTest.java
index c340a8133f..2a536a5048 100644
--- a/src/test/java/org/alfresco/repo/transfer/RepoTransferReceiverImplTest.java
+++ b/src/test/java/org/alfresco/repo/transfer/RepoTransferReceiverImplTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.transfer;
import static org.mockito.Mockito.*;
@@ -77,6 +77,7 @@ import org.alfresco.test_category.BaseSpringTestsCategory;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.BaseAlfrescoSpringTest;
import org.alfresco.util.GUID;
+import org.alfresco.util.testing.category.LuceneTests;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.experimental.categories.Category;
@@ -90,7 +91,7 @@ import org.springframework.transaction.support.DefaultTransactionDefinition;
* @author Brian Remmington
*/
@SuppressWarnings("deprecation")
-@Category(BaseSpringTestsCategory.class)
+@Category({BaseSpringTestsCategory.class, LuceneTests.class})
public class RepoTransferReceiverImplTest extends BaseAlfrescoSpringTest
{
private static int fileCount = 0;
diff --git a/src/test/java/org/alfresco/repo/transfer/TransferServiceImplTest.java b/src/test/java/org/alfresco/repo/transfer/TransferServiceImplTest.java
index ebe0797c99..3c7de41e21 100644
--- a/src/test/java/org/alfresco/repo/transfer/TransferServiceImplTest.java
+++ b/src/test/java/org/alfresco/repo/transfer/TransferServiceImplTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.transfer;
import static org.mockito.Mockito.mock;
@@ -108,6 +108,7 @@ import org.alfresco.util.GUID;
import org.alfresco.util.Pair;
import org.alfresco.util.PropertyMap;
import org.alfresco.util.TempFileProvider;
+import org.alfresco.util.testing.category.LuceneTests;
import org.junit.experimental.categories.Category;
import org.springframework.util.ResourceUtils;
@@ -119,7 +120,7 @@ import org.springframework.util.ResourceUtils;
* @author Mark Rogers
*/
@SuppressWarnings("deprecation")
-@Category(BaseSpringTestsCategory.class)
+@Category({BaseSpringTestsCategory.class, LuceneTests.class})
public class TransferServiceImplTest extends BaseAlfrescoSpringTest
{
private TransferService transferService;
diff --git a/src/test/java/org/alfresco/repo/transfer/TransferServiceToBeRefactoredTest.java b/src/test/java/org/alfresco/repo/transfer/TransferServiceToBeRefactoredTest.java
index e75feeb4cc..c7370fd7ac 100644
--- a/src/test/java/org/alfresco/repo/transfer/TransferServiceToBeRefactoredTest.java
+++ b/src/test/java/org/alfresco/repo/transfer/TransferServiceToBeRefactoredTest.java
@@ -92,6 +92,7 @@ import org.alfresco.util.BaseAlfrescoSpringTest;
import org.alfresco.util.GUID;
import org.alfresco.util.Pair;
import org.alfresco.util.PropertyMap;
+import org.alfresco.util.testing.category.LuceneTests;
import org.junit.experimental.categories.Category;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.support.DefaultTransactionDefinition;
@@ -108,7 +109,7 @@ import org.springframework.util.ResourceUtils;
* @author Mark Rogers
*/
@SuppressWarnings("deprecation")
-@Category(BaseSpringTestsCategory.class)
+@Category({BaseSpringTestsCategory.class, LuceneTests.class})
public class TransferServiceToBeRefactoredTest extends BaseAlfrescoSpringTest
{
private TransferService transferService;
diff --git a/src/test/java/org/alfresco/repo/usage/RepoUsageComponentTest.java b/src/test/java/org/alfresco/repo/usage/RepoUsageComponentTest.java
index 2c4d6d0de9..bd32f4de1c 100644
--- a/src/test/java/org/alfresco/repo/usage/RepoUsageComponentTest.java
+++ b/src/test/java/org/alfresco/repo/usage/RepoUsageComponentTest.java
@@ -40,6 +40,7 @@ import org.alfresco.service.cmr.admin.RepoUsageStatus;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
+import org.alfresco.util.testing.category.LuceneTests;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.FixMethodOrder;
@@ -54,7 +55,7 @@ import org.springframework.context.ApplicationContext;
* @since 3.5
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
-@Category(OwnJVMTestsCategory.class)
+@Category({OwnJVMTestsCategory.class, LuceneTests.class})
public class RepoUsageComponentTest extends TestCase
{
private ApplicationContext ctx;
diff --git a/src/test/java/org/alfresco/repo/usage/UsageTestSuite.java b/src/test/java/org/alfresco/repo/usage/UsageTestSuite.java
deleted file mode 100644
index 101e752435..0000000000
--- a/src/test/java/org/alfresco/repo/usage/UsageTestSuite.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
-package org.alfresco.repo.usage;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.alfresco.util.ApplicationContextHelper;
-import org.springframework.context.ApplicationContext;
-
-/**
- * @author Derek Hulley
- * @since V3.4 Team
- */
-public class UsageTestSuite extends TestSuite
-{
- public static Test suite()
- {
- TestSuite suite = new TestSuite();
- suite.addTestSuite(RepoUsageComponentTest.class);
- suite.addTestSuite(UserUsageTest.class);
- suite.addTestSuite(UserUsageTrackingComponentTest.class);
- return suite;
- }
-}
diff --git a/src/test/java/org/alfresco/repo/virtual/VirtualizationIntegrationTest.java b/src/test/java/org/alfresco/repo/virtual/VirtualizationIntegrationTest.java
index 280e772f75..7ce3a11485 100644
--- a/src/test/java/org/alfresco/repo/virtual/VirtualizationIntegrationTest.java
+++ b/src/test/java/org/alfresco/repo/virtual/VirtualizationIntegrationTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.virtual;
@@ -66,12 +66,15 @@ import org.alfresco.service.namespace.QName;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.traitextender.SpringExtensionBundle;
import org.alfresco.util.ApplicationContextHelper;
+import org.alfresco.util.testing.category.LuceneTests;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
@Ignore
+@Category(LuceneTests.class)
public abstract class VirtualizationIntegrationTest extends TestCase implements VirtualizationTest
{
private static Log logger = LogFactory.getLog(VirtualizationIntegrationTest.class);
@@ -80,8 +83,8 @@ public abstract class VirtualizationIntegrationTest extends TestCase implements
protected static final String VIRTUAL_FOLDER_1_NAME = "VirtualFolder1";
- protected static final String VIRTUAL_FOLDER_2_NAME = "VirtualFolder2";
-
+ protected static final String VIRTUAL_FOLDER_2_NAME = "VirtualFolder2";
+
protected static final String VIRTUAL_FOLDER_3_NAME = "VirtualFolder3";
protected static final String TEST_ROOT_FOLDER_NAME = "TestFolder";
@@ -179,8 +182,8 @@ public abstract class VirtualizationIntegrationTest extends TestCase implements
@Override
protected void setUp() throws Exception
- {
- ctx = ApplicationContextHelper.getApplicationContext(CONFIG_LOCATIONS);
+ {
+ ctx = ApplicationContextHelper.getApplicationContext(CONFIG_LOCATIONS);
virtualizationConfigTestBootstrap = ctx.getBean(VIRTUALIZATION_CONFIG_TEST_BOOTSTRAP_BEAN_ID,
VirtualizationConfigTestBootstrap.class);
diff --git a/src/test/java/org/alfresco/repo/virtual/VirtualizationIntegrationTestSuite.java b/src/test/java/org/alfresco/repo/virtual/VirtualizationIntegrationTestSuite.java
deleted file mode 100644
index a242f3cc68..0000000000
--- a/src/test/java/org/alfresco/repo/virtual/VirtualizationIntegrationTestSuite.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
-
-package org.alfresco.repo.virtual;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.alfresco.repo.virtual.bundle.FileInfoPropsComparatorTest;
-import org.alfresco.repo.virtual.bundle.VirtualCheckOutCheckInServiceExtensionTest;
-import org.alfresco.repo.virtual.bundle.VirtualFileFolderServiceExtensionTest;
-import org.alfresco.repo.virtual.bundle.VirtualLockableAspectInterceptorExtensionTest;
-import org.alfresco.repo.virtual.bundle.VirtualNodeServiceExtensionTest;
-import org.alfresco.repo.virtual.bundle.VirtualPermissionServiceExtensionTest;
-import org.alfresco.repo.virtual.bundle.VirtualPreferenceServiceExtensionTest;
-import org.alfresco.repo.virtual.bundle.VirtualRatingServiceExtensionTest;
-import org.alfresco.repo.virtual.bundle.VirtualVersionServiceExtensionTest;
-import org.alfresco.repo.virtual.config.NodeRefPathExpressionTest;
-import org.alfresco.repo.virtual.model.SystemTemplateLocationsConstraintTest;
-import org.alfresco.repo.virtual.store.SystemVirtualizationMethodTest;
-import org.alfresco.repo.virtual.store.TypeVirtualizationMethodTest;
-import org.alfresco.repo.virtual.store.VirtualStoreImplTest;
-import org.alfresco.repo.virtual.template.ApplyTemplateMethodTest;
-import org.alfresco.repo.virtual.template.TemplateFilingRuleTest;
-import org.alfresco.repo.virtual.template.TemplateResourceProcessorTest;
-
-/**
- * @author Bogdan Horje
- */
-public class VirtualizationIntegrationTestSuite extends TestSuite implements VirtualizationTest
-{
-
- public static Test suite()
- {
- TestSuite suite = new TestSuite();
-
- suite.addTest(new JUnit4TestAdapter(VirtualPreferenceServiceExtensionTest.class));
- suite.addTest(new JUnit4TestAdapter(VirtualLockableAspectInterceptorExtensionTest.class));
- suite.addTest(new JUnit4TestAdapter(VirtualVersionServiceExtensionTest.class));
- suite.addTest(new JUnit4TestAdapter(VirtualRatingServiceExtensionTest.class));
- suite.addTest(new JUnit4TestAdapter(VirtualCheckOutCheckInServiceExtensionTest.class));
- suite.addTest(new JUnit4TestAdapter(VirtualPermissionServiceExtensionTest.class));
- suite.addTest(new JUnit4TestAdapter(VirtualNodeServiceExtensionTest.class));
- suite.addTest(new JUnit4TestAdapter(VirtualFileFolderServiceExtensionTest.class));
- suite.addTest(new JUnit4TestAdapter(ApplyTemplateMethodTest.class));
- suite.addTest(new JUnit4TestAdapter(SystemTemplateLocationsConstraintTest.class));
- suite.addTest(new JUnit4TestAdapter(SystemVirtualizationMethodTest.class));
- suite.addTest(new JUnit4TestAdapter(TypeVirtualizationMethodTest.Integration.class));
- suite.addTest(new JUnit4TestAdapter(TemplateResourceProcessorTest.class));
- suite.addTest(new JUnit4TestAdapter(VirtualStoreImplTest.class));
- suite.addTest(new JUnit4TestAdapter(NodeRefPathExpressionTest.class));
- suite.addTest(new JUnit4TestAdapter(TemplateFilingRuleTest.class));
- suite.addTest(new JUnit4TestAdapter(FileInfoPropsComparatorTest.class));
-
- return suite;
-
- }
-}
diff --git a/src/test/java/org/alfresco/repo/virtual/VirtualizationUnitTestSuite.java b/src/test/java/org/alfresco/repo/virtual/VirtualizationUnitTestSuite.java
deleted file mode 100644
index 14d072b9c5..0000000000
--- a/src/test/java/org/alfresco/repo/virtual/VirtualizationUnitTestSuite.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
-
-package org.alfresco.repo.virtual;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class VirtualizationUnitTestSuite
-{
- /**
- * Creates the test suite
- *
- * @return the test suite
- */
- public static Test suite()
- {
- TestSuite suite = new TestSuite();
- unitTests(suite);
- return suite;
- }
-
- static void unitTests(TestSuite suite)
- {
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.page.PageCollatorTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.GetChildByIdMethodTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.GetParentReferenceMethodTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.NewVirtualReferenceMethodTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.PlainReferenceParserTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.PlainStringifierTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.ProtocolTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.ReferenceTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.ResourceParameterTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.StringParameterTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.VirtualProtocolTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.store.ReferenceComparatorTest.class));
-
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.ZeroReferenceParserTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.ZeroStringifierTest.class));
-
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.HashStringifierTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.NodeRefRadixHasherTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.NumericPathHasherTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.ref.StoredPathHasherTest.class));
-
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.template.VirtualQueryImplTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.repo.virtual.store.TypeVirtualizationMethodTest.Unit.class));
- }
-}
diff --git a/src/test/java/org/alfresco/repo/virtual/bundle/VirtualCheckOutCheckInServiceExtensionTest.java b/src/test/java/org/alfresco/repo/virtual/bundle/VirtualCheckOutCheckInServiceExtensionTest.java
index f7019deddc..75edcd71f5 100644
--- a/src/test/java/org/alfresco/repo/virtual/bundle/VirtualCheckOutCheckInServiceExtensionTest.java
+++ b/src/test/java/org/alfresco/repo/virtual/bundle/VirtualCheckOutCheckInServiceExtensionTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.virtual.bundle;
import java.io.Serializable;
@@ -44,9 +44,12 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.version.Version;
import org.alfresco.service.cmr.version.VersionService;
import org.alfresco.service.cmr.version.VersionType;
+import org.alfresco.util.testing.category.LuceneTests;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.springframework.extensions.surf.util.I18NUtil;
+@Category(LuceneTests.class)
public class VirtualCheckOutCheckInServiceExtensionTest extends VirtualizationIntegrationTest
{
private static final String PROP_VERSION_LABEL_3 = "1.0";
@@ -69,7 +72,7 @@ public class VirtualCheckOutCheckInServiceExtensionTest extends VirtualizationIn
private static final String PROP_FILE_NAME = "originalFile";
- private String PROP_WORKING_COPY_NAME;
+ private String PROP_WORKING_COPY_NAME;
private CheckOutCheckInService checkOutCheckInService;
@@ -84,10 +87,10 @@ public class VirtualCheckOutCheckInServiceExtensionTest extends VirtualizationIn
@Override
protected void setUp() throws Exception
{
- super.setUp();
- PROP_WORKING_COPY_NAME = CheckOutCheckInServiceImpl
- .createWorkingCopyName(PROP_FILE_NAME,
- I18NUtil.getMessage("coci_service.working_copy_label"));
+ super.setUp();
+ PROP_WORKING_COPY_NAME = CheckOutCheckInServiceImpl
+ .createWorkingCopyName(PROP_FILE_NAME,
+ I18NUtil.getMessage("coci_service.working_copy_label"));
checkOutCheckInService = ctx.getBean("checkOutCheckInService",
CheckOutCheckInService.class);
diff --git a/src/test/java/org/alfresco/repo/virtual/bundle/VirtualFileFolderServiceExtensionTest.java b/src/test/java/org/alfresco/repo/virtual/bundle/VirtualFileFolderServiceExtensionTest.java
index eb6167a668..f142942c88 100644
--- a/src/test/java/org/alfresco/repo/virtual/bundle/VirtualFileFolderServiceExtensionTest.java
+++ b/src/test/java/org/alfresco/repo/virtual/bundle/VirtualFileFolderServiceExtensionTest.java
@@ -49,8 +49,11 @@ import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
import org.alfresco.util.TempFileProvider;
+import org.alfresco.util.testing.category.LuceneTests;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(LuceneTests.class)
public class VirtualFileFolderServiceExtensionTest extends VirtualizationIntegrationTest
{
diff --git a/src/test/java/org/alfresco/repo/virtual/bundle/VirtualNodeServiceExtensionTest.java b/src/test/java/org/alfresco/repo/virtual/bundle/VirtualNodeServiceExtensionTest.java
index 237b1190d4..5f4c3bfe42 100644
--- a/src/test/java/org/alfresco/repo/virtual/bundle/VirtualNodeServiceExtensionTest.java
+++ b/src/test/java/org/alfresco/repo/virtual/bundle/VirtualNodeServiceExtensionTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.virtual.bundle;
@@ -61,11 +61,14 @@ import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.QNamePattern;
import org.alfresco.service.namespace.RegexQNamePattern;
+import org.alfresco.util.testing.category.LuceneTests;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Ignore;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(LuceneTests.class)
public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTest
{
private static final String NODE2TEST1_2_TXT = "NODE2test1_2.txt";
@@ -150,7 +153,7 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
"Node2_1");
ChildAssociationRef childAssocRef = createContent(assocNode2_1,
"Content");
- NodeRef node = childAssocRef.getChildRef();
+ NodeRef node = childAssocRef.getChildRef();
Reference reference = Reference.fromNodeRef(node);
assertNotNull(reference);
assertTrue(reference.getProtocol().equals(Protocols.NODE.protocol));
@@ -370,7 +373,7 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
* @param childAssocsRef
*/
private void assertNewVirtualChildAssocRef(NodeRef nodeRef, ChildAssociationRef childAssocsRef)
- {
+ {
Reference reference = Reference.fromNodeRef(nodeRef);
assertNotNull(reference);
assertNewVirtualChildAssocRef(reference,
@@ -389,12 +392,12 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
assertNotNull(childAssocsRef);
NodeRef childNodeRef = childAssocsRef.getChildRef();
NodeRef parentNodeRef = childAssocsRef.getParentRef();
- Reference parentNodeRefV = Reference.fromNodeRef(parentNodeRef);
+ Reference parentNodeRefV = Reference.fromNodeRef(parentNodeRef);
assertNotNull(parentNodeRefV);
assertEquals(reference,parentNodeRefV);
- Reference childReference = Reference.fromNodeRef(childNodeRef);
+ Reference childReference = Reference.fromNodeRef(childNodeRef);
assertNotNull(childReference);
Reference parent = childReference.execute(new GetParentReferenceMethod());
assertEquals(reference,
@@ -528,7 +531,7 @@ public class VirtualNodeServiceExtensionTest extends VirtualizationIntegrationTe
private ChildAssociationRef findActualAssocPeer(ChildAssociationRef virtualAssoc, NodeRef actualParentNodeRef)
{
List actualAssocs = nodeService.getChildAssocs(actualParentNodeRef);
- NodeRef virtualChildNodeRef = virtualAssoc.getChildRef();
+ NodeRef virtualChildNodeRef = virtualAssoc.getChildRef();
Reference vChildNodeRef = Reference.fromNodeRef(virtualChildNodeRef);
assertNotNull(vChildNodeRef);
NodeRef materialNodeRef = smartStore.materialize(vChildNodeRef);
diff --git a/src/test/java/org/alfresco/repo/virtual/bundle/VirtualPermissionServiceExtensionTest.java b/src/test/java/org/alfresco/repo/virtual/bundle/VirtualPermissionServiceExtensionTest.java
index c764cf3da5..6db770c652 100644
--- a/src/test/java/org/alfresco/repo/virtual/bundle/VirtualPermissionServiceExtensionTest.java
+++ b/src/test/java/org/alfresco/repo/virtual/bundle/VirtualPermissionServiceExtensionTest.java
@@ -49,8 +49,11 @@ import org.alfresco.service.cmr.security.AccessStatus;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.cmr.site.SiteService;
import org.alfresco.service.cmr.site.SiteVisibility;
+import org.alfresco.util.testing.category.LuceneTests;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(LuceneTests.class)
public class VirtualPermissionServiceExtensionTest extends VirtualizationIntegrationTest
{
private PermissionServiceSPI permissionService;
diff --git a/src/test/java/org/alfresco/repo/virtual/bundle/VirtualPreferenceServiceExtensionTest.java b/src/test/java/org/alfresco/repo/virtual/bundle/VirtualPreferenceServiceExtensionTest.java
index 84c5152d6b..dea4871b7e 100644
--- a/src/test/java/org/alfresco/repo/virtual/bundle/VirtualPreferenceServiceExtensionTest.java
+++ b/src/test/java/org/alfresco/repo/virtual/bundle/VirtualPreferenceServiceExtensionTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.virtual.bundle;
@@ -37,7 +37,10 @@ import org.alfresco.service.cmr.preference.PreferenceService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
+import org.alfresco.util.testing.category.LuceneTests;
+import org.junit.experimental.categories.Category;
+@Category(LuceneTests.class)
public class VirtualPreferenceServiceExtensionTest extends VirtualizationIntegrationTest
{
private static final String DOCUMENTS_FAVOURITES_KEY = "org.alfresco.share.documents.favourites";
diff --git a/src/test/java/org/alfresco/repo/virtual/template/ApplyTemplateMethodTest.java b/src/test/java/org/alfresco/repo/virtual/template/ApplyTemplateMethodTest.java
index 034e30f330..e02a107ee7 100644
--- a/src/test/java/org/alfresco/repo/virtual/template/ApplyTemplateMethodTest.java
+++ b/src/test/java/org/alfresco/repo/virtual/template/ApplyTemplateMethodTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.virtual.template;
@@ -40,8 +40,11 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.search.ResultSet;
import org.alfresco.service.cmr.search.SearchParameters;
+import org.alfresco.util.testing.category.LuceneTests;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(LuceneTests.class)
public class ApplyTemplateMethodTest extends VirtualizationIntegrationTest
{
@Test
diff --git a/src/test/java/org/alfresco/repo/web/scripts/BaseWebScriptTest.java b/src/test/java/org/alfresco/repo/web/scripts/BaseWebScriptTest.java
index 13388759aa..37b9db9511 100644
--- a/src/test/java/org/alfresco/repo/web/scripts/BaseWebScriptTest.java
+++ b/src/test/java/org/alfresco/repo/web/scripts/BaseWebScriptTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.web.scripts;
import java.io.IOException;
@@ -40,6 +40,7 @@ import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.web.scripts.servlet.LocalTestRunAsAuthenticatorFactory;
+import org.alfresco.util.testing.category.LuceneTests;
import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod;
@@ -52,6 +53,7 @@ import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.PutMethod;
import org.apache.commons.httpclient.params.HttpClientParams;
+import org.junit.experimental.categories.Category;
import org.springframework.extensions.webscripts.TestWebScriptServer;
import org.springframework.extensions.webscripts.TestWebScriptServer.Request;
import org.springframework.extensions.webscripts.TestWebScriptServer.Response;
@@ -62,6 +64,7 @@ import org.springframework.extensions.webscripts.servlet.ServletAuthenticatorFac
*
* @author Roy Wetherall
*/
+@Category(LuceneTests.class)
public abstract class BaseWebScriptTest extends TestCase
{
// Test Listener
diff --git a/src/test/java/org/alfresco/repo/workflow/AbstractWorkflowServiceIntegrationTest.java b/src/test/java/org/alfresco/repo/workflow/AbstractWorkflowServiceIntegrationTest.java
index 5d788c4632..574033bbfa 100644
--- a/src/test/java/org/alfresco/repo/workflow/AbstractWorkflowServiceIntegrationTest.java
+++ b/src/test/java/org/alfresco/repo/workflow/AbstractWorkflowServiceIntegrationTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.repo.workflow;
@@ -72,12 +72,15 @@ import org.alfresco.util.BaseSpringTest;
import org.alfresco.util.GUID;
import org.alfresco.util.collections.CollectionUtils;
import org.alfresco.util.collections.Function;
+import org.alfresco.util.testing.category.LuceneTests;
+import org.junit.experimental.categories.Category;
/**
* @author Nick Smith
* @author Frederik Heremans
* @since 3.4.e
*/
+@Category(LuceneTests.class)
public abstract class AbstractWorkflowServiceIntegrationTest extends BaseSpringTest
{
private static final String XML = MimetypeMap.MIMETYPE_XML;
diff --git a/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiWorkflowServiceIntegrationTest.java b/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiWorkflowServiceIntegrationTest.java
index ed4b7bcd29..a8eb91ad6e 100644
--- a/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiWorkflowServiceIntegrationTest.java
+++ b/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiWorkflowServiceIntegrationTest.java
@@ -61,11 +61,14 @@ import org.alfresco.service.cmr.workflow.WorkflowTaskState;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.GUID;
+import org.alfresco.util.testing.category.LuceneTests;
+import org.junit.experimental.categories.Category;
/**
* @author Nick Smith
* @since 3.4.e
*/
+@Category(LuceneTests.class)
public class ActivitiWorkflowServiceIntegrationTest extends AbstractWorkflowServiceIntegrationTest
{
private final static String USER_RECREATED = "WFUserRecreated" + GUID.generate();
diff --git a/src/test/java/org/alfresco/traitextender/TraitExtenderUnitTestSuite.java b/src/test/java/org/alfresco/traitextender/TraitExtenderUnitTestSuite.java
deleted file mode 100644
index 7ff8f9efe9..0000000000
--- a/src/test/java/org/alfresco/traitextender/TraitExtenderUnitTestSuite.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
-
-package org.alfresco.traitextender;
-
-import junit.framework.JUnit4TestAdapter;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class TraitExtenderUnitTestSuite
-{
- /**
- * Creates the test suite
- *
- * @return the test suite
- */
- public static Test suite()
- {
- TestSuite suite = new TestSuite();
- unitTests(suite);
- return suite;
- }
-
- static void unitTests(TestSuite suite)
- {
- suite.addTest(new JUnit4TestAdapter(org.alfresco.traitextender.TraitExtenderIntegrationTest.class));
- suite.addTest(new JUnit4TestAdapter(org.alfresco.traitextender.AJExtensionsCompileTest.class));
- }
-}
diff --git a/src/test/java/org/alfresco/util/schemacomp/DbToXMLTest.java b/src/test/java/org/alfresco/util/schemacomp/DbToXMLTest.java
index 1f05091a55..0d13a06589 100644
--- a/src/test/java/org/alfresco/util/schemacomp/DbToXMLTest.java
+++ b/src/test/java/org/alfresco/util/schemacomp/DbToXMLTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.util.schemacomp;
@@ -30,7 +30,9 @@ import java.io.File;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.TempFileProvider;
+import org.alfresco.util.testing.category.DBTests;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
/**
@@ -38,6 +40,7 @@ import org.springframework.context.ApplicationContext;
*
* @author Matt Ward
*/
+@Category(DBTests.class)
public class DbToXMLTest
{
@Test
diff --git a/src/test/java/org/alfresco/util/schemacomp/ExportDbTest.java b/src/test/java/org/alfresco/util/schemacomp/ExportDbTest.java
index 1ffbcbe075..554b4ad8ba 100644
--- a/src/test/java/org/alfresco/util/schemacomp/ExportDbTest.java
+++ b/src/test/java/org/alfresco/util/schemacomp/ExportDbTest.java
@@ -36,6 +36,7 @@ import org.alfresco.util.schemacomp.test.exportdb.AbstractExportTester;
import org.alfresco.util.schemacomp.test.exportdb.AlfrescoMariaDBDialectExportTester;
import org.alfresco.util.schemacomp.test.exportdb.MySQLDialectExportTester;
import org.alfresco.util.schemacomp.test.exportdb.PostgreSQLDialectExportTester;
+import org.alfresco.util.testing.category.DBTests;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.dialect.Dialect;
@@ -58,7 +59,7 @@ import org.springframework.transaction.PlatformTransactionManager;
* @see AbstractExportTester
* @author Matt Ward
*/
-@Category(OwnJVMTestsCategory.class)
+@Category({OwnJVMTestsCategory.class, DBTests.class})
public class ExportDbTest
{
private ApplicationContext ctx;
diff --git a/src/test/java/org/alfresco/util/schemacomp/SchemaReferenceFileTest.java b/src/test/java/org/alfresco/util/schemacomp/SchemaReferenceFileTest.java
index 35df75ddce..5c620c075d 100644
--- a/src/test/java/org/alfresco/util/schemacomp/SchemaReferenceFileTest.java
+++ b/src/test/java/org/alfresco/util/schemacomp/SchemaReferenceFileTest.java
@@ -1,28 +1,28 @@
-/*
- * #%L
- * Alfresco Repository
- * %%
- * Copyright (C) 2005 - 2016 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 .
- * #L%
- */
+/*
+ * #%L
+ * Alfresco Repository
+ * %%
+ * Copyright (C) 2005 - 2016 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 .
+ * #L%
+ */
package org.alfresco.util.schemacomp;
@@ -34,6 +34,7 @@ import java.io.PrintWriter;
import org.alfresco.repo.domain.schema.SchemaBootstrap;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
+import org.alfresco.util.testing.category.DBTests;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -55,7 +56,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
* @see DbToXML
* @author Matt Ward
*/
-@Category(OwnJVMTestsCategory.class)
+@Category({OwnJVMTestsCategory.class, DBTests.class})
public class SchemaReferenceFileTest
{
private ClassPathXmlApplicationContext ctx;