Skip to content

Commit

Permalink
Use ClassPathExclusions.packages to exclude JDK HttpClient
Browse files Browse the repository at this point in the history
  • Loading branch information
poutsma committed Jul 3, 2023
1 parent 6228be2 commit a2cb968
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ClientHttpRequestFactoriesHttpComponentsTests

@Override
protected long connectTimeout(HttpComponentsClientHttpRequestFactory requestFactory) {
return (int) ReflectionTestUtils.getField(requestFactory, "connectTimeout");
return (long) ReflectionTestUtils.getField(requestFactory, "connectTimeout");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected long connectTimeout(JdkClientHttpRequestFactory requestFactory) {
@Override
@SuppressWarnings("unchecked")
protected long readTimeout(JdkClientHttpRequestFactory requestFactory) {
return (int) ReflectionTestUtils.getField(requestFactory, "readTimeout");
return ((Duration) ReflectionTestUtils.getField(requestFactory, "readTimeout")).toMillis();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* @author Andy Wilkinson
*/
@ClassPathExclusions({ "httpclient5-*.jar", "okhttp-*.jar" })
@ClassPathExclusions(value = {"httpclient5-*.jar", "okhttp-*.jar"}, packages = "java.net.http")
class ClientHttpRequestFactoriesSimpleTests
extends AbstractClientHttpRequestFactoriesTests<SimpleClientHttpRequestFactory> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*
* @author Stephane Nicoll
*/
@ClassPathExclusions({ "httpclient5-*.jar", "okhttp*.jar" })
@ClassPathExclusions(value = {"httpclient5-*.jar", "okhttp-*.jar"}, packages = "java.net.http")
class HttpWebServiceMessageSenderBuilderSimpleIntegrationTests {

private final HttpWebServiceMessageSenderBuilder builder = new HttpWebServiceMessageSenderBuilder();
Expand Down

0 comments on commit a2cb968

Please sign in to comment.