Latest dependency updates (HttpClient 4.4, TestNG 6.8.21, SnakeYAML 1.15, FreeMarker 2.3.22, JRuby 1.7.19, JAMon 2.81, JiBX 1.2.6, XMLUnit 1.6, JsonPath 1.2)

This commit is contained in:
Juergen Hoeller
2015-03-02 20:00:17 +01:00
parent 4a46b60e2a
commit ee74fe6c27
5 changed files with 86 additions and 96 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,6 +32,9 @@ import org.springframework.http.HttpMethod;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
/**
* @author Stephane Nicoll
*/
public class HttpComponentsClientHttpRequestFactoryTests extends AbstractHttpRequestFactoryTestCase {
@Override
@@ -81,19 +84,6 @@ public class HttpComponentsClientHttpRequestFactoryTests extends AbstractHttpReq
assertEquals("Wrong custom socket timeout", 4567, requestConfig.getSocketTimeout());
}
@Test
public void customHttpClientUsesItsDefault() throws Exception {
HttpComponentsClientHttpRequestFactory hrf =
new HttpComponentsClientHttpRequestFactory(HttpClientBuilder.create().build());
URI uri = new URI(baseUrl + "/status/ok");
HttpComponentsClientHttpRequest request = (HttpComponentsClientHttpRequest)
hrf.createRequest(uri, HttpMethod.GET);
assertNull("No custom config should be set with a custom HttpClient",
request.getHttpContext().getAttribute(HttpClientContext.REQUEST_CONFIG));
}
@Test
public void defaultSettingsOfHttpClientMergedOnExecutorCustomization() throws Exception {
RequestConfig defaultConfig = RequestConfig.custom().setConnectTimeout(1234).build();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,6 @@ import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
/**
*
* @author Stephane Nicoll
*/
public class HttpComponentsHttpInvokerRequestExecutorTests {
@@ -80,16 +79,6 @@ public class HttpComponentsHttpInvokerRequestExecutorTests {
assertEquals(10000, httpPost.getConfig().getSocketTimeout());
}
@Test
public void customHttpClientUsesItsDefault() throws IOException {
HttpComponentsHttpInvokerRequestExecutor executor =
new HttpComponentsHttpInvokerRequestExecutor(HttpClientBuilder.create().build());
HttpInvokerClientConfiguration config = mockHttpInvokerClientConfiguration("http://fake-service");
HttpPost httpPost = executor.createHttpPost(config);
assertNull("No custom config should be set with a custom HttpClient", httpPost.getConfig());
}
@Test
public void defaultSettingsOfHttpClientMergedOnExecutorCustomization() throws IOException {
RequestConfig defaultConfig = RequestConfig.custom().setConnectTimeout(1234).build();