mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.0 (5.2.0) to HEAD (5.2)
134734 jvonka: Merged 5.2.N (5.2.1) to 5.2.0 (5.2.0) 134715 jvonka: Merged 5.2.N-LAST-T-MOD (5.2.1) to 5.2.N (5.2.1) 134684 jvonka: REPO-1644: Add REST API level test to check lastThumbnailModification property update (on upload new version) - note: will fail until we implement fix - see also REPO-1580 / MNT-17113 (we need to confirm it's the same/related issue on 5.0.N) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@134979 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -218,6 +218,23 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
|
||||
return response;
|
||||
}
|
||||
|
||||
protected HttpResponse post(String url, byte[] body, Map<String, String> params, Map<String, String> headers, String apiName, String contentType, int expectedStatus) throws Exception
|
||||
{
|
||||
RequestBuilder requestBuilder = httpClient.new PostRequestBuilder()
|
||||
.setBodyAsByteArray(body)
|
||||
.setContentType(contentType)
|
||||
.setRequestContext(publicApiClient.getRequestContext())
|
||||
.setScope(getScope())
|
||||
.setApiName(apiName)
|
||||
.setEntityCollectionName(url)
|
||||
.setHeaders(headers)
|
||||
.setParams(params);
|
||||
HttpResponse response = publicApiClient.execute(requestBuilder);
|
||||
checkStatus(expectedStatus, response.getStatusCode());
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
protected HttpResponse post(String url, String body, Map<String, String> params, Map<String, String> headers, String apiName, int expectedStatus) throws Exception
|
||||
{
|
||||
RequestBuilder requestBuilder = httpClient.new PostRequestBuilder()
|
||||
@@ -270,6 +287,7 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
|
||||
return response;
|
||||
}
|
||||
|
||||
// TODO unused queryString - fix-up usages and then remove
|
||||
protected HttpResponse post(String entityCollectionName, String entityId, String relationCollectionName, byte[] body, String queryString, String contentType, int expectedStatus) throws Exception
|
||||
{
|
||||
HttpResponse response = publicApiClient.post(getScope(), entityCollectionName, entityId, relationCollectionName, null, body, contentType);
|
||||
@@ -824,9 +842,14 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
|
||||
protected static final int MAX_RETRY = 20;
|
||||
|
||||
protected Rendition waitAndGetRendition(String sourceNodeId, String renditionId) throws Exception
|
||||
{
|
||||
return waitAndGetRendition(sourceNodeId, renditionId, MAX_RETRY, PAUSE_TIME);
|
||||
}
|
||||
|
||||
protected Rendition waitAndGetRendition(String sourceNodeId, String renditionId, int maxRetry, long pauseTime) throws Exception
|
||||
{
|
||||
int retryCount = 0;
|
||||
while (retryCount < MAX_RETRY)
|
||||
while (retryCount < maxRetry)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -843,7 +866,7 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
|
||||
retryCount++;
|
||||
|
||||
System.out.println("waitAndGetRendition: "+retryCount);
|
||||
Thread.sleep(PAUSE_TIME);
|
||||
Thread.sleep(pauseTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user