Enable concurrency test for apache http client 2.0 (#4021)
This commit is contained in:
parent
c918cdeb76
commit
7fdbd0c55f
|
@ -9,6 +9,7 @@ import io.opentelemetry.instrumentation.test.base.HttpClientTest
|
||||||
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes
|
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes
|
||||||
import org.apache.commons.httpclient.HttpClient
|
import org.apache.commons.httpclient.HttpClient
|
||||||
import org.apache.commons.httpclient.HttpMethod
|
import org.apache.commons.httpclient.HttpMethod
|
||||||
|
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager
|
||||||
import org.apache.commons.httpclient.methods.DeleteMethod
|
import org.apache.commons.httpclient.methods.DeleteMethod
|
||||||
import org.apache.commons.httpclient.methods.GetMethod
|
import org.apache.commons.httpclient.methods.GetMethod
|
||||||
import org.apache.commons.httpclient.methods.HeadMethod
|
import org.apache.commons.httpclient.methods.HeadMethod
|
||||||
|
@ -20,17 +21,12 @@ import spock.lang.Shared
|
||||||
|
|
||||||
class CommonsHttpClientTest extends HttpClientTest<HttpMethod> implements AgentTestTrait {
|
class CommonsHttpClientTest extends HttpClientTest<HttpMethod> implements AgentTestTrait {
|
||||||
@Shared
|
@Shared
|
||||||
HttpClient client = new HttpClient()
|
HttpClient client = new HttpClient(new MultiThreadedHttpConnectionManager())
|
||||||
|
|
||||||
def setupSpec() {
|
def setupSpec() {
|
||||||
client.setConnectionTimeout(CONNECT_TIMEOUT_MS)
|
client.setConnectionTimeout(CONNECT_TIMEOUT_MS)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
boolean testCausality() {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
HttpMethod buildRequest(String method, URI uri, Map<String, String> headers) {
|
HttpMethod buildRequest(String method, URI uri, Map<String, String> headers) {
|
||||||
def request
|
def request
|
||||||
|
@ -74,8 +70,7 @@ class CommonsHttpClientTest extends HttpClientTest<HttpMethod> implements AgentT
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean testRedirects() {
|
boolean testCircularRedirects() {
|
||||||
// Generates 4 spans
|
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue