From 4bf2f8e6da91e5b8fa6e0413d5878c7eea4a054d Mon Sep 17 00:00:00 2001 From: Alan Davis Date: Mon, 15 Oct 2018 22:37:25 +0100 Subject: [PATCH] REPO-3690 TAS tests need to wait longer for renditions as they are async and can be more than 2 seconds if done by Transform Service. --- .../alfresco/rest/people/AvatarPeopleSanityTest.java | 2 +- .../alfresco/rest/renditions/CreateRenditionTests.java | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/e2e-test/java/org/alfresco/rest/people/AvatarPeopleSanityTest.java b/e2e-test/java/org/alfresco/rest/people/AvatarPeopleSanityTest.java index 2476373a0..73aae3bdf 100644 --- a/e2e-test/java/org/alfresco/rest/people/AvatarPeopleSanityTest.java +++ b/e2e-test/java/org/alfresco/rest/people/AvatarPeopleSanityTest.java @@ -38,7 +38,7 @@ public class AvatarPeopleSanityTest extends RestTest ValidatableResponse response = restClient.withCoreAPI().usingAuthUser() .uploadAvatarContent(restProperties.envProperty().getFullServerUrl(), avatarFile).statusCode(200); // Renditions are async - Utility.sleep(200, 2000, () -> + Utility.sleep(500, 60000, () -> { restClient.authenticateUser(userModel).withCoreAPI().usingAuthUser().downloadAvatarContent(); restClient.assertStatusCodeIs(HttpStatus.OK); diff --git a/e2e-test/java/org/alfresco/rest/renditions/CreateRenditionTests.java b/e2e-test/java/org/alfresco/rest/renditions/CreateRenditionTests.java index fdd0f131b..4c8964aee 100644 --- a/e2e-test/java/org/alfresco/rest/renditions/CreateRenditionTests.java +++ b/e2e-test/java/org/alfresco/rest/renditions/CreateRenditionTests.java @@ -90,8 +90,12 @@ public class CreateRenditionTests extends RestTest restClient.authenticateUser(user).withCoreAPI().usingNode(document).createNodeRendition("doclib"); restClient.assertStatusCodeIs(HttpStatus.ACCEPTED); - - restClient.withCoreAPI().usingNode(document).getNodeRenditionUntilIsCreated("doclib") - .assertThat().field("status").is("CREATED"); + + // Renditions are async + Utility.sleep(500, 60000, () -> + { + restClient.withCoreAPI().usingNode(document).getNodeRenditionUntilIsCreated("doclib") + .assertThat().field("status").is("CREATED"); + }); } }