REPO-3766 Make avatar check async

This commit is contained in:
Alex Mukha
2018-09-20 23:03:51 +01:00
parent 228efef0da
commit c85c9563cf
@@ -37,8 +37,12 @@ public class AvatarPeopleSanityTest extends RestTest
restClient.authenticateUser(userModel);
ValidatableResponse response = restClient.withCoreAPI().usingAuthUser()
.uploadAvatarContent(restProperties.envProperty().getFullServerUrl(), avatarFile).statusCode(200);
restClient.authenticateUser(userModel).withCoreAPI().usingAuthUser().downloadAvatarContent();
restClient.assertStatusCodeIs(HttpStatus.OK);
// Renditions are async
Utility.sleep(200, 2000, () ->
{
restClient.authenticateUser(userModel).withCoreAPI().usingAuthUser().downloadAvatarContent();
restClient.assertStatusCodeIs(HttpStatus.OK);
});
assertNotNull(response.extract().body().asByteArray());
assertTrue(response.extract().body().asByteArray().length > 0, "Avatar Image not uploaded");
}