Merged HEAD (5.2) to 5.2.N (5.2.1)

126529 jkaabimofrad: 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/BRANCHES/DEV/5.2.N/root@126873 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-05-11 12:00:45 +00:00
parent 601aa347e9
commit 3d53b94976
3 changed files with 64 additions and 19 deletions

View File

@@ -209,6 +209,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));