Directly initialize OkHttp without using test util. (#3304)

* Directly initialize OkHttp without using test util.

* Consistent version with smoke test
This commit is contained in:
Anuraag Agrawal 2021-06-15 18:42:55 +09:00 committed by GitHub
parent e399ffeffa
commit e9244e6398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -11,6 +11,7 @@ dependencies {
exclude group: 'org.eclipse.jetty', module: 'jetty-server'
}
testImplementation "com.squareup.okhttp3:okhttp:3.12.12"
testImplementation "javax.servlet:javax.servlet-api:3.0.1"
testImplementation "org.eclipse.jetty:jetty-server:8.0.0.v20110901"
testImplementation "org.eclipse.jetty:jetty-servlet:8.0.0.v20110901"

View File

@ -4,7 +4,6 @@ import static io.opentelemetry.sdk.testing.assertj.TracesAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import io.opentelemetry.api.trace.SpanKind;
import io.opentelemetry.instrumentation.test.utils.OkHttpUtils;
import io.opentelemetry.instrumentation.test.utils.PortUtils;
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension;
import java.io.IOException;
@ -31,7 +30,7 @@ class DemoServlet3InstrumentationTest {
static final AgentInstrumentationExtension instrumentation = AgentInstrumentationExtension
.create();
static final OkHttpClient httpClient = OkHttpUtils.client();
static final OkHttpClient httpClient = new OkHttpClient();
static int port;
static Server server;