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 org.apache.commons.httpclient.HttpClient
|
||||
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.GetMethod
|
||||
import org.apache.commons.httpclient.methods.HeadMethod
|
||||
|
@ -20,17 +21,12 @@ import spock.lang.Shared
|
|||
|
||||
class CommonsHttpClientTest extends HttpClientTest<HttpMethod> implements AgentTestTrait {
|
||||
@Shared
|
||||
HttpClient client = new HttpClient()
|
||||
HttpClient client = new HttpClient(new MultiThreadedHttpConnectionManager())
|
||||
|
||||
def setupSpec() {
|
||||
client.setConnectionTimeout(CONNECT_TIMEOUT_MS)
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean testCausality() {
|
||||
return false
|
||||
}
|
||||
|
||||
@Override
|
||||
HttpMethod buildRequest(String method, URI uri, Map<String, String> headers) {
|
||||
def request
|
||||
|
@ -74,8 +70,7 @@ class CommonsHttpClientTest extends HttpClientTest<HttpMethod> implements AgentT
|
|||
}
|
||||
|
||||
@Override
|
||||
boolean testRedirects() {
|
||||
// Generates 4 spans
|
||||
boolean testCircularRedirects() {
|
||||
false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue