"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestClientRequestExecution.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.

TestClientRequestExecution.java  (httpcomponents-client-5.2-src):TestClientRequestExecution.java  (httpcomponents-client-5.2.1-src)
skipping to change at line 70 skipping to change at line 70
import org.apache.hc.core5.http.io.entity.EntityUtils; import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.apache.hc.core5.http.io.entity.InputStreamEntity; import org.apache.hc.core5.http.io.entity.InputStreamEntity;
import org.apache.hc.core5.http.io.entity.StringEntity; import org.apache.hc.core5.http.io.entity.StringEntity;
import org.apache.hc.core5.http.message.BasicClassicHttpRequest; import org.apache.hc.core5.http.message.BasicClassicHttpRequest;
import org.apache.hc.core5.http.protocol.HttpContext; import org.apache.hc.core5.http.protocol.HttpContext;
import org.apache.hc.core5.net.URIBuilder; import org.apache.hc.core5.net.URIBuilder;
import org.apache.hc.core5.testing.classic.ClassicTestServer; import org.apache.hc.core5.testing.classic.ClassicTestServer;
import org.apache.hc.core5.util.TimeValue; import org.apache.hc.core5.util.TimeValue;
import org.apache.hc.core5.util.Timeout; import org.apache.hc.core5.util.Timeout;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension; import org.junit.jupiter.api.extension.RegisterExtension;
/** /**
* Client protocol handling tests. * Client protocol handling tests.
*/ */
public class TestClientRequestExecution { public class TestClientRequestExecution {
public static final Timeout TIMEOUT = Timeout.ofMinutes(1); public static final Timeout TIMEOUT = Timeout.ofMinutes(1);
skipping to change at line 328 skipping to change at line 329
}); });
final HttpRequest request = context.getRequest(); final HttpRequest request = context.getRequest();
Assertions.assertEquals("/stuff", request.getRequestUri()); Assertions.assertEquals("/stuff", request.getRequestUri());
final RedirectLocations redirectLocations = context.getRedirectLocations (); final RedirectLocations redirectLocations = context.getRedirectLocations ();
final URI location = URIUtils.resolve(uri, target, redirectLocations.get All()); final URI location = URIUtils.resolve(uri, target, redirectLocations.get All());
Assertions.assertEquals(uri, location); Assertions.assertEquals(uri, location);
} }
@Test @Test @Disabled("Fails intermittently with GitHub Actions")
public void testRequestCancellation() throws Exception { public void testRequestCancellation() throws Exception {
startServer(); startServer();
final HttpHost target = targetHost(); final HttpHost target = targetHost();
final CloseableHttpClient client = testResources.startClient( final CloseableHttpClient client = testResources.startClient(
builder -> builder builder -> builder
.setMaxConnPerRoute(1) .setMaxConnPerRoute(1)
.setMaxConnTotal(1), .setMaxConnTotal(1),
builder -> {}); builder -> {});
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

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