mirror of https://github.com/apache/archiva.git
ensure in tests we are fine with post and returning json type
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1175923 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7be4016505
commit
534b2e8363
|
@ -34,6 +34,7 @@ import org.apache.cxf.jaxrs.client.WebClient;
|
||||||
import org.apache.archiva.common.utils.FileUtil;
|
import org.apache.archiva.common.utils.FileUtil;
|
||||||
import org.codehaus.redback.rest.services.AbstractRestServicesTest;
|
import org.codehaus.redback.rest.services.AbstractRestServicesTest;
|
||||||
|
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -152,6 +153,9 @@ public abstract class AbstractArchivaRestTest
|
||||||
JAXRSClientFactory.create( "http://localhost:" + port + "/" + getRestServicesPath() + "/archivaServices/",
|
JAXRSClientFactory.create( "http://localhost:" + port + "/" + getRestServicesPath() + "/archivaServices/",
|
||||||
ArchivaAdministrationService.class );
|
ArchivaAdministrationService.class );
|
||||||
|
|
||||||
|
WebClient.client( service ).accept( MediaType.APPLICATION_JSON_TYPE );
|
||||||
|
WebClient.client( service ).type( MediaType.APPLICATION_JSON_TYPE );
|
||||||
|
|
||||||
WebClient.client( service ).header( "Authorization", authorizationHeader );
|
WebClient.client( service ).header( "Authorization", authorizationHeader );
|
||||||
WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000 );
|
WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000 );
|
||||||
return service;
|
return service;
|
||||||
|
|
Loading…
Reference in New Issue