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.

This commit is contained in:
Alan Davis
2018-10-15 22:37:25 +01:00
parent e71f74ab20
commit 4bf2f8e6da
2 changed files with 8 additions and 4 deletions
@@ -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);
@@ -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");
});
}
}