"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestConnectExec.java" between
httpcomponents-client-5.2-src.tar.gz and httpcomponents-client-5.2.1-src.tar.gz

About: Apache HttpComponents Client provides reusable components for client-side authentication, HTTP state management, and HTTP connection management. Java sources.

TestConnectExec.java  (httpcomponents-client-5.2-src):TestConnectExec.java  (httpcomponents-client-5.2.1-src)
skipping to change at line 99 skipping to change at line 99
exec = new ConnectExec(reuseStrategy, proxyHttpProcessor, proxyAuthStrat egy, null, true); exec = new ConnectExec(reuseStrategy, proxyHttpProcessor, proxyAuthStrat egy, null, true);
target = new HttpHost("foo", 80); target = new HttpHost("foo", 80);
proxy = new HttpHost("bar", 8888); proxy = new HttpHost("bar", 8888);
} }
@Test @Test
public void testExecAcquireConnection() throws Exception { public void testExecAcquireConnection() throws Exception {
final HttpRoute route = new HttpRoute(target); final HttpRoute route = new HttpRoute(target);
final HttpClientContext context = new HttpClientContext(); final HttpClientContext context = new HttpClientContext();
final ClassicHttpRequest request = new HttpGet("http://bar/test"); final ClassicHttpRequest request = new HttpGet("http://bar/test");
final ClassicHttpResponse response = new BasicClassicHttpResponse(200, " try (final ClassicHttpResponse response = new BasicClassicHttpResponse(2
OK"); 00, "OK")) {
response.setEntity(EntityBuilder.create() response.setEntity(EntityBuilder.create()
.setStream(new ByteArrayInputStream(new byte[]{})) .setStream(new ByteArrayInputStream(new byte[]{}))
.build()); .build());
}
context.setUserToken("Blah"); context.setUserToken("Blah");
Mockito.when(execRuntime.isEndpointAcquired()).thenReturn(false); Mockito.when(execRuntime.isEndpointAcquired()).thenReturn(false);
final ExecChain.Scope scope = new ExecChain.Scope("test", route, request , execRuntime, context); final ExecChain.Scope scope = new ExecChain.Scope("test", route, request , execRuntime, context);
exec.execute(request, scope, execChain); exec.execute(request, scope, execChain);
Mockito.verify(execRuntime).acquireEndpoint("test", route, "Blah", conte xt); Mockito.verify(execRuntime).acquireEndpoint("test", route, "Blah", conte xt);
Mockito.verify(execRuntime).connectEndpoint(context); Mockito.verify(execRuntime).connectEndpoint(context);
} }
@Test @Test
 End of changes. 1 change blocks. 
5 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)