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-12 09:18:01 +01:00
parent defd734290
commit 4e10666bd9
2 changed files with 10 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);
@@ -19,6 +19,8 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import static java.lang.Thread.sleep;
/**
* Handles tests related to POST api-explorer/#!/renditions
* @author Cristina Axinte
@@ -90,8 +92,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");
}
}
}