Skip to content

Commit

Permalink
Enable read timeout test for HttpURLConnection (open-telemetry#4699)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored and RashmiRam committed May 23, 2022
1 parent 193b109 commit 97f4fd1
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class HttpUrlConnectionTest extends HttpClientTest<HttpURLConnection> implements

@Override
int sendRequest(HttpURLConnection connection, String method, URI uri, Map<String, String> headers) {
if (uri.toString().contains("/read-timeout")) {
connection.readTimeout = READ_TIMEOUT_MS
}
try {
connection.setRequestMethod(method)
headers.each { connection.setRequestProperty(it.key, it.value) }
Expand Down Expand Up @@ -65,6 +68,11 @@ class HttpUrlConnectionTest extends HttpClientTest<HttpURLConnection> implements
return false
}

@Override
boolean testReadTimeout() {
true
}

@Unroll
def "trace request (useCaches: #useCaches)"() {
setup:
Expand Down

0 comments on commit 97f4fd1

Please sign in to comment.