Fixed broken test case
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1181127 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
da570f7079
commit
e41274c27d
|
@ -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);
|
||||
|
|
|
@ -151,7 +151,6 @@ public class TestClientReauthentication extends BasicServerTestBase {
|
|||
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());
|
||||
|
|
Loading…
Reference in New Issue