diff --git a/pom.xml b/pom.xml
index 8028720281..62a6270382 100644
--- a/pom.xml
+++ b/pom.xml
@@ -646,7 +646,7 @@
provided
-
+
org.apache.camel
camel-mock
${camel.mock.version}
diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/v0/BaseAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/v0/BaseAPI.java
index 366e4a245a..95b05be349 100644
--- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/v0/BaseAPI.java
+++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/v0/BaseAPI.java
@@ -77,6 +77,7 @@ public abstract class BaseAPI
/** exception key in JSON response body */
private static final String EXCEPTION_KEY = "exception";
+ private static final String MESSAGE_KEY = "message";
public static final String NODE_PREFIX = "workspace/SpacesStore/";
protected static final String UPDATE_METADATA_API = "{0}node/{1}/formprocessor";
protected static final String ACTIONS_API = "{0}actionQueue";
@@ -582,6 +583,12 @@ public abstract class BaseAPI
break;
case HttpStatus.SC_INTERNAL_SERVER_ERROR:
+ if (responseBody != null && responseBody.has(EXCEPTION_KEY))
+ {
+ LOGGER.error("Request failed with error message: {}", responseBody.getString(MESSAGE_KEY));
+ returnValues = responseBody;
+ }
+ break;
case HttpStatus.SC_BAD_REQUEST:
case HttpStatus.SC_UNPROCESSABLE_ENTITY:
if (responseBody != null && responseBody.has(EXCEPTION_KEY))
diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java
index 1b57359633..013de0ad71 100644
--- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java
+++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java
@@ -48,6 +48,7 @@ import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.create
import static org.alfresco.rest.rm.community.utils.RMSiteUtil.createStandardRMSiteModel;
import static org.alfresco.utility.data.RandomData.getRandomAlphanumeric;
import static org.springframework.http.HttpStatus.CREATED;
+import static org.springframework.http.HttpStatus.NO_CONTENT;
import static org.springframework.http.HttpStatus.OK;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
@@ -194,6 +195,7 @@ public class BaseRMRestTest extends RestTest
if (rmSiteAPI.existsRMSite())
{
rmSiteAPI.deleteRMSite();
+ assertStatusCode(NO_CONTENT);
}
rmSiteAPI.createRMSite(rmSiteModel);
diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml
index 482af53384..ff74ae7b86 100644
--- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml
+++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml
@@ -269,5 +269,4 @@
true
-
diff --git a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java
index 96922c1352..0265521c11 100644
--- a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java
+++ b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java
@@ -969,7 +969,7 @@ public class DispositionServiceImplTest extends BaseRMTestCase
public DispositionActionDefinition run() throws Exception
{
DispositionActionDefinition actionDefinition = testRM386DispositionSchedule.getDispositionActionDefinitionByName("cutoff");
- assertNotNull(actionDefinition);
+ assertNotNull( "Expected an action definition", actionDefinition);
Map adParams = new HashMap<>(3);
diff --git a/scripts/waitForAlfrescoToStart.sh b/scripts/waitForAlfrescoToStart.sh
index 065ae39544..4e378948d1 100755
--- a/scripts/waitForAlfrescoToStart.sh
+++ b/scripts/waitForAlfrescoToStart.sh
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-
+set -xe
WAIT_INTERVAL=1
COUNTER=0
TIMEOUT=300
diff --git a/travis/.travis.tests-stage.yml b/travis/.travis.tests-stage.yml
index 2ec17a9ae0..c774080e8d 100644
--- a/travis/.travis.tests-stage.yml
+++ b/travis/.travis.tests-stage.yml
@@ -70,6 +70,24 @@ jobs:
- bash scripts/getLogs.sh
- bash scripts/cleanup.sh
+ - name: "Enterprise Rest API Cluster Tests"
+ stage: Tests
+ addons:
+ artifacts:
+ paths:
+ - ./rm-automation/rm-automation-enterprise-rest-api/target/reports/rm-automation-enterprise-rest-api.log
+ - ./rm-automation/rm-automation-enterprise-rest-api/target/surefire-reports
+ target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER
+ install:
+ - travis_retry travis_wait 90 mvn -B -U -q clean install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo -am
+ - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-enterprise-rest-api -am
+ before_script:
+ - bash scripts/start-compose.sh "${ENTERPRISE_REPO_PATH}/docker-compose-cluster.yml"
+ - bash scripts/waitForAlfrescoToStart.sh
+ script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=clusterTestSuite.xml -Dskip.automationtests=false
+ after_failure:
+ - docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000
+ - docker ps -a | grep '_alfresco2_1' | awk '{print $1}' | xargs docker logs | tail -5000
- &community_shared_UI_configuration
name: "Community Smoke UI Tests for Records"