hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1181127 - in /httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http: client/protocol/TestRequestAuthCache.java impl/client/TestClientReauthentication.java
Date Mon, 10 Oct 2011 18:41:38 GMT
Author: olegk
Date: Mon Oct 10 18:41:37 2011
New Revision: 1181127

URL: http://svn.apache.org/viewvc?rev=1181127&view=rev
Log:
Fixed broken test case

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRequestAuthCache.java
    httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestClientReauthentication.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRequestAuthCache.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRequestAuthCache.java?rev=1181127&r1=1181126&r2=1181127&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRequestAuthCache.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/client/protocol/TestRequestAuthCache.java
Mon Oct 10 18:41:37 2011
@@ -31,6 +31,7 @@ import junit.framework.Assert;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestInterceptor;
+import org.apache.http.auth.AuthProtocolState;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.AuthState;
 import org.apache.http.auth.Credentials;
@@ -230,10 +231,12 @@ public class TestRequestAuthCache {
 
         context.setAttribute(ClientContext.AUTH_CACHE, authCache);
 
+        this.targetState.setState(AuthProtocolState.CHALLENGED);
         this.targetState.setAuthScheme(new BasicScheme());
         this.targetState.setCredentials(new UsernamePasswordCredentials("user3", "secret3"));
         this.proxyState.setAuthScheme(new BasicScheme());
         this.proxyState.setCredentials(new UsernamePasswordCredentials("user4", "secret4"));
+        this.proxyState.setState(AuthProtocolState.CHALLENGED);
 
         HttpRequestInterceptor interceptor = new RequestAuthCache();
         interceptor.process(request, context);

Modified: httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestClientReauthentication.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestClientReauthentication.java?rev=1181127&r1=1181126&r2=1181127&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestClientReauthentication.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/client/TestClientReauthentication.java
Mon Oct 10 18:41:37 2011
@@ -151,7 +151,6 @@ public class TestClientReauthentication 
         HttpContext context = new BasicHttpContext();
         for (int i = 0; i < 10; i++) {
             HttpGet httpget = new HttpGet("/");
-            System.out.println("count " + i);
             HttpResponse response = this.httpclient.execute(getServerHttp(), httpget, context);
             HttpEntity entity = response.getEntity();
             Assert.assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());



Mime
View raw message