mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
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:
@@ -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));
|
||||
|
Reference in New Issue
Block a user