Fix khttp sporadic test failure
MODIFY
instrumentation/khttp-0.1/src/test/groovy/KHttpClientTest.groovy
instrumentation/khttp-0.1/src/test/groovy/KHttpClientTest.groovy
@@ -21,7 +21,9 @@ class KHttpClientTest extends HttpClientTest {
@Override
int doRequest(String method, URI uri, Map<String, String> headers, Closure callback) {
- def response = KHttp.request(method, uri.toString(), headers, Collections.emptyMap(), null, null, null, null, 1)
+ // khttp applies the same timeout for both connect and read
+ def timeoutSeconds = Math.max(CONNECT_TIMEOUT_MS, READ_TIMEOUT_MS) / 1000
+ def response = KHttp.request(method, uri.toString(), headers, Collections.emptyMap(), null, null, null, null, timeoutSeconds)
if (callback != null) {
callback.call()
}

Fix khttp sporadic test failure (#591)