diff --git a/e2e-test/pom.xml b/e2e-test/pom.xml
index 4f3b3230f..f6f0c8256 100644
--- a/e2e-test/pom.xml
+++ b/e2e-test/pom.xml
@@ -12,8 +12,8 @@
Test Project to test Search Service and Analytics Features on a complete setup of Alfresco, Share
6.0.0.3
- 6.0.0.1
- 2.0.9
+ 6.0.0.0
+ 2.0.1
2.6.0
src/test/resources/SearchSuite.xml
@@ -54,24 +54,12 @@
restapi-test
${tas.rest.api.version}
test
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
org.alfresco.tas
cmis-test
${tas.cmis.api.version}
test
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
org.alfresco
@@ -85,12 +73,6 @@
${rm.version}
tests
test
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
diff --git a/e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/cmis/AbstractCmisE2ETest.java b/e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/cmis/AbstractCmisE2ETest.java
index 89c190bc3..f301a63ec 100644
--- a/e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/cmis/AbstractCmisE2ETest.java
+++ b/e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/cmis/AbstractCmisE2ETest.java
@@ -1,13 +1,13 @@
package org.alfresco.test.search.functional.searchServices.cmis;
-import java.lang.reflect.Method;
-
import org.alfresco.cmis.CmisProperties;
import org.alfresco.cmis.CmisWrapper;
+
+import java.lang.reflect.Method;
+
import org.alfresco.test.search.functional.searchServices.search.AbstractSearchServicesE2ETest;
-import org.alfresco.utility.Utility;
+import org.alfresco.utility.LogFactory;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@@ -25,7 +25,7 @@ import org.testng.annotations.BeforeMethod;
@Scope(value = "prototype")
public abstract class AbstractCmisE2ETest extends AbstractSearchServicesE2ETest
{
- private static Logger LOGGER = LoggerFactory.getLogger(AbstractCmisE2ETest.class);
+ private static Logger LOG = LogFactory.getLogger();
@Autowired
protected CmisWrapper cmisApi;
@@ -38,50 +38,17 @@ public abstract class AbstractCmisE2ETest extends AbstractSearchServicesE2ETest
@BeforeMethod(alwaysRun = true)
public void showStartTestInfo(Method method)
{
- LOGGER.info(String.format("*** STARTING Test: [%s] ***", method.getName()));
+ LOG.info(String.format("*** STARTING Test: [%s] ***", method.getName()));
}
@AfterMethod(alwaysRun = true)
public void showEndTestInfo(Method method)
{
- LOGGER.info(String.format("*** ENDING Test: [%s] ***", method.getName()));
+ LOG.info(String.format("*** ENDING Test: [%s] ***", method.getName()));
}
public Integer getSolrWaitTimeInSeconds()
{
return cmisProperties.envProperty().getSolrWaitTimeInSeconds();
}
-
- /**
- * Repeat SOLR Query till results count returns expectedCountResults
- * @param query CMIS Query to be executed
- * @param expectedCountResults Number of results expected
- * @return true when results count is equals to expectedCountResults
- * @throws Exception
- */
- protected boolean waitForIndexing(String query, long expectedCountResults) throws Exception
- {
-
- for (int searchCount = 1; searchCount <= 3; searchCount++)
- {
-
- try
- {
- cmisApi.withQuery(query).assertResultsCount().equals(expectedCountResults);
- return true;
- }
- catch (AssertionError ae)
- {
- LOGGER.debug(ae.toString());
- }
-
-
- Utility.waitToLoopTime(properties.getSolrWaitTimeInSeconds(), "Wait For Indexing");
-
- }
-
- return false;
- }
-
-
}
diff --git a/e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/cmis/SolrSearchScoreQueryTests.java b/e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/cmis/SolrSearchScoreQueryTests.java
deleted file mode 100644
index 11726579a..000000000
--- a/e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/cmis/SolrSearchScoreQueryTests.java
+++ /dev/null
@@ -1,195 +0,0 @@
-package org.alfresco.test.search.functional.searchServices.cmis;
-
-import java.math.BigDecimal;
-
-import org.alfresco.utility.data.provider.XMLDataConfig;
-import org.alfresco.utility.data.provider.XMLTestData;
-import org.alfresco.utility.data.provider.XMLTestDataProvider;
-import org.alfresco.utility.model.TestGroup;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.Test;
-
-/**
- * Testing SCORE function queries to solve issues related to
- * https://issues.alfresco.com/jira/browse/ACE-2479
- *
- * @author aborroy
- *
- */
-public class SolrSearchScoreQueryTests extends AbstractCmisE2ETest
-{
-
- private static Logger LOGGER = LoggerFactory.getLogger(SolrSearchScoreQueryTests.class);
- private XMLTestData testData;
-
- @AfterClass(alwaysRun = true)
- public void cleanupEnvironment()
- {
- if (testData != null)
- {
- testData.cleanup(dataContent);
- }
- else
- {
- LOGGER.warn("testData is inexplicably null - skipping clean up.");
- }
- }
-
- /* These tests does not require AbstractSearchServicesE2ETest common tests,
- * as it's focused on testing scoring function features
- * @see org.alfresco.test.search.functional.searchServices.search.AbstractSearchServicesE2ETest#searchServicesDataPreparation()
- */
- @Override
- public void searchServicesDataPreparation() throws Exception
- {
- }
-
- /* These tests does not require common data preparation from AbstractE2EFunctionalTest
- * as it's including every test data required in search-score-funtion.xml
- * @see org.alfresco.test.search.functional.AbstractE2EFunctionalTest#dataPreparation()
- */
- @Override
- public void dataPreparation() throws Exception
- {
- }
-
- @Test(dataProviderClass = XMLTestDataProvider.class, dataProvider = "getAllData")
- @XMLDataConfig(file = "src/test/resources/testdata/search-score-function.xml")
- public void prepareDataForScoreSearch(XMLTestData testData) throws Exception
- {
- this.testData = testData;
- this.testData.createUsers(dataUser);
- this.testData.createSitesStructure(dataSite, dataContent, dataUser);
- cmisApi.authenticateUser(dataUser.getCurrentUser());
-
- }
-
- /**
- * Verify that results are ordered
- * @throws Exception
- */
- @Test(groups = { TestGroup.CMIS, TestGroup.QUERIES }, dependsOnMethods = "prepareDataForScoreSearch")
- public void scoreQueryOrdered() throws Exception
- {
-
- String query = "SELECT cmis:objectId, SCORE() AS orderCriteria "
- + "FROM cmis:document "
- + "WHERE CONTAINS('Quidditch') "
- + "ORDER BY orderCriteria";
-
- if (waitForIndexing(query, 3))
- {
- cmisApi
- .withQuery(query)
- .assertColumnIsOrdered().isOrderedAsc("orderCriteria");
- }
- else
- {
- throw new AssertionError("Wait for indexing has failed!");
- }
-
- }
-
- /**
- * Verify that results are inverse ordered
- * @throws Exception
- */
- @Test(groups = { TestGroup.CMIS, TestGroup.QUERIES }, dependsOnMethods = "prepareDataForScoreSearch")
- public void scoreQueryOrderedDesc() throws Exception
- {
-
- String query = "SELECT cmis:objectId, SCORE() AS orderCriteria "
- + "FROM cmis:document "
- + "WHERE CONTAINS('Quidditch') "
- + "ORDER BY orderCriteria DESC";
-
- if (waitForIndexing(query, 3))
- {
- cmisApi
- .withQuery(query).assertColumnIsOrdered().isOrderedDesc("orderCriteria");
- }
- else
- {
- throw new AssertionError("Wait for indexing has failed!");
- }
-
- }
-
- /**
- * Verify that all SCORE results are between 0 and 1
- * @throws Exception
- */
- @Test(groups = { TestGroup.CMIS, TestGroup.QUERIES }, dependsOnMethods = "prepareDataForScoreSearch")
- public void scoreQueryInRange() throws Exception
- {
-
- String query = "SELECT cmis:objectId, SCORE() "
- + "FROM cmis:document "
- + "WHERE CONTAINS('Quidditch')";
-
- if (waitForIndexing(query, 3))
- {
- cmisApi
- .withQuery(query)
- .assertColumnValuesRange().isReturningValuesInRange("SEARCH_SCORE", BigDecimal.ZERO, BigDecimal.ONE);
- }
- else
- {
- throw new AssertionError("Wait for indexing has failed!");
- }
-
- }
-
- /**
- * Verify that all SCORE results are between 0 and 1
- * @throws Exception
- */
- @Test(groups = { TestGroup.CMIS, TestGroup.QUERIES }, dependsOnMethods = "prepareDataForScoreSearch")
- public void scoreQueryAliasInRange() throws Exception
- {
-
- String query = "SELECT cmis:objectId, SCORE() AS orderCriteria "
- + "FROM cmis:document "
- + "WHERE CONTAINS('Quidditch')";
-
- if (waitForIndexing(query, 3))
- {
- cmisApi
- .withQuery(query)
- .assertColumnValuesRange().isReturningValuesInRange("orderCriteria", BigDecimal.ZERO, BigDecimal.ONE);
- }
- else
- {
- throw new AssertionError("Wait for indexing has failed!");
- }
-
- }
-
- /**
- * Verify that SCORE is valid name for an alias
- * Currently only supported with double quotes
- * @throws Exception
- */
- @Test(groups = { TestGroup.CMIS, TestGroup.QUERIES }, dependsOnMethods = "prepareDataForScoreSearch")
- public void scoreQueryScoreAsAlias() throws Exception
- {
-
- String query = "SELECT cmis:objectId, SCORE() AS \"score\" "
- + "FROM cmis:document "
- + "WHERE CONTAINS('Quidditch')";
-
- if (waitForIndexing(query, 3))
- {
- cmisApi
- .withQuery(query).assertResultsCount().equals(3);
- }
- else
- {
- throw new AssertionError("Wait for indexing has failed!");
- }
-
- }
-
-}
diff --git a/e2e-test/src/test/resources/default.properties b/e2e-test/src/test/resources/default.properties
index f832c5e17..72d142995 100644
--- a/e2e-test/src/test/resources/default.properties
+++ b/e2e-test/src/test/resources/default.properties
@@ -1,7 +1,7 @@
# Alfresco HTTP Server Settings
alfresco.scheme=http
alfresco.server=localhost
-alfresco.port=8080
+alfresco.port=8081
# sync service related
sync.scheme=http
diff --git a/e2e-test/src/test/resources/testdata/search-score-function.xml b/e2e-test/src/test/resources/testdata/search-score-function.xml
deleted file mode 100644
index 9c9fdc33d..000000000
--- a/e2e-test/src/test/resources/testdata/search-score-function.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- Quidditch
-
-
- Quidditch Quidditch
-
-
- Quidditch Quidditch Quidditch
-
-
- Some other words
-
-
-
-
-
-
-
-