From 8f279fca44024560c4b7bfd3ff3341c9dee74634 Mon Sep 17 00:00:00 2001 From: Imran M Yousuf Date: Tue, 17 Feb 2009 15:13:40 +0600 Subject: [PATCH] Test freezes Signed-off-by: Imran M Yousuf --- .../ws/server/BookStoreResourcesTest.java | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/WebServiceServer/src/test/java/com/smartitengineering/bookstore/ws/server/BookStoreResourcesTest.java b/WebServiceServer/src/test/java/com/smartitengineering/bookstore/ws/server/BookStoreResourcesTest.java index b3ad4b8..31bc45b 100644 --- a/WebServiceServer/src/test/java/com/smartitengineering/bookstore/ws/server/BookStoreResourcesTest.java +++ b/WebServiceServer/src/test/java/com/smartitengineering/bookstore/ws/server/BookStoreResourcesTest.java @@ -18,6 +18,7 @@ import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.WebResource; import com.sun.jersey.api.client.WebResource.Builder; import com.sun.jersey.client.apache.ApacheHttpClient; +import com.sun.jersey.client.apache.config.ApacheHttpClientConfig; import com.sun.jersey.client.apache.config.DefaultApacheHttpClientConfig; import com.sun.jersey.core.util.MultivaluedMapImpl; import java.io.File; @@ -75,6 +76,8 @@ public class BookStoreResourcesTest glassfish.deploy(war); DefaultApacheHttpClientConfig clientConfig = new DefaultApacheHttpClientConfig(); clientConfig.getState().setCredentials(null, null, -1, "modhu", "modhu"); + clientConfig.getProperties().put(ApacheHttpClientConfig.PROPERTY_PREEMPTIVE_AUTHENTICATION, + Boolean.TRUE); client = ApacheHttpClient.create(clientConfig); webResource = client.resource(BASE_URI); } -- 1.5.6