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:
Olivier Lamy 2011-09-26 16:04:03 +00:00
parent 7be4016505
commit 534b2e8363
1 changed files with 4 additions and 0 deletions

View File

@ -34,6 +34,7 @@ import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.archiva.common.utils.FileUtil;
import org.codehaus.redback.rest.services.AbstractRestServicesTest;
import javax.ws.rs.core.MediaType;
import java.io.File;
/**
@ -152,6 +153,9 @@ public abstract class AbstractArchivaRestTest
JAXRSClientFactory.create( "http://localhost:" + port + "/" + getRestServicesPath() + "/archivaServices/",
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.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000 );
return service;