mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-17 14:21:39 +00:00
[fix/MNT-24172-fixRecreationOfRendition2] Test Case for recreation of Rendition2
This commit is contained in:
@@ -39,8 +39,6 @@ import java.io.ByteArrayInputStream;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.HttpURLConnection;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -57,6 +55,7 @@ import org.apache.commons.httpclient.params.HttpClientParams;
|
|||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.springframework.extensions.webscripts.TestWebScriptServer.GetRequest;
|
||||||
import org.springframework.extensions.webscripts.TestWebScriptServer.Request;
|
import org.springframework.extensions.webscripts.TestWebScriptServer.Request;
|
||||||
import org.springframework.extensions.webscripts.TestWebScriptServer.Response;
|
import org.springframework.extensions.webscripts.TestWebScriptServer.Response;
|
||||||
|
|
||||||
@@ -1047,24 +1046,15 @@ public class RenditionsTest extends AbstractBaseApiTest
|
|||||||
|
|
||||||
AuthenticationUtil.setFullyAuthenticatedUser(userOneN1.getUserName());
|
AuthenticationUtil.setFullyAuthenticatedUser(userOneN1.getUserName());
|
||||||
|
|
||||||
String urlDocument = "http://localhost:8080/share/page/context/mine/document-details?";
|
String urlDocument = "/share/page/context/mine/document-details?";
|
||||||
|
|
||||||
String pageParams = new StringBuilder()
|
String nodeParams = new StringBuilder()
|
||||||
.append("nodeRef=")
|
.append("nodeRef=")
|
||||||
.append(getFolderNodeRef(folderId))
|
.append(getFolderNodeRef(folderId))
|
||||||
.toString();
|
.toString();
|
||||||
|
|
||||||
URL url = new URL(urlDocument + pageParams);
|
Response responseDocument = sendRequest(new GetRequest(urlDocument + nodeParams), 200);
|
||||||
|
assertNotNull(responseDocument.getContentLength());
|
||||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
|
||||||
conn.setRequestMethod("GET");
|
|
||||||
conn.setRequestProperty("Content-Type", "text/html; charset=UTF-8");
|
|
||||||
|
|
||||||
int status = conn.getResponseCode();
|
|
||||||
assertEquals(200, status);
|
|
||||||
|
|
||||||
// Response responseDocument = sendRequest(new GetRequest(urlDocument + "?" + pageParams), 200);
|
|
||||||
// assertNotNull(responseDocument.getContentLength());
|
|
||||||
|
|
||||||
Thread.sleep(DELAY_IN_MS);
|
Thread.sleep(DELAY_IN_MS);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user