Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)

123126 jkaabimofrad: RA-676: Added 304 response tests in the download rendition api. Also, removed the check for "Expires" header in the tests (as we are using no-cache by default, the "Expires" header value always returns "Thu, 01 Jan 1970 00:00:00 GMT", so it is currently irrelevant).


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126529 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 11:21:17 +00:00
parent ee3a942fc7
commit 071f8481d6
3 changed files with 64 additions and 19 deletions

View File

@@ -202,6 +202,25 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
return response;
}
protected HttpResponse getSingleWithDelayRetry(String url, String runAsUser, String entityId, Map<String, String> params,
Map<String, String> headers, int repeat, long pauseInMillisecond, int expectedStatus) throws Exception
{
int retryCount = 0;
while (retryCount < repeat)
{
try
{
return getSingle(url, runAsUser, entityId, params, headers, expectedStatus);
}
catch (AssertionError ex)
{
retryCount++;
Thread.sleep(pauseInMillisecond);
}
}
return null;
}
protected HttpResponse put(String url, String runAsUser, String entityId, String body, String queryString, int expectedStatus) throws Exception
{
publicApiClient.setRequestContext(new RequestContext(runAsUser));