Remove insecure trust manager from test (#3268)

This commit is contained in:
Trask Stalnaker 2021-06-12 02:03:46 -07:00 committed by GitHub
parent bec9966e30
commit 80a7403763
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -27,7 +27,6 @@ import io.netty.handler.codec.http.HttpMethod
import io.netty.handler.codec.http.HttpVersion
import io.netty.handler.ssl.SslContext
import io.netty.handler.ssl.SslContextBuilder
import io.netty.handler.ssl.util.InsecureTrustManagerFactory
import io.opentelemetry.api.common.AttributeKey
import io.opentelemetry.instrumentation.test.AgentTestTrait
import io.opentelemetry.instrumentation.test.base.HttpClientTest
@ -64,7 +63,7 @@ class Netty41ClientTest extends HttpClientTest<DefaultFullHttpRequest> implement
protected void initChannel(SocketChannel socketChannel) throws Exception {
ChannelPipeline pipeline = socketChannel.pipeline()
if (https) {
SslContext sslContext = SslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE).build()
SslContext sslContext = SslContextBuilder.forClient().build()
pipeline.addLast(sslContext.newHandler(socketChannel.alloc()))
}
pipeline.addLast(new HttpClientCodec())