orpiske commented on a change in pull request #1097: URL: https://github.com/apache/camel-kafka-connector/pull/1097#discussion_r592349021
########## File path: tests/itests-common/src/test/java/org/apache/camel/kafkaconnector/common/services/mockweb/MockWebService.java ########## @@ -0,0 +1,136 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.camel.kafkaconnector.common.services.mockweb; + +import java.security.KeyStore; +import java.util.stream.IntStream; + +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManagerFactory; + +import okhttp3.mockwebserver.MockResponse; +import okhttp3.mockwebserver.MockWebServer; +import org.junit.jupiter.api.extension.AfterEachCallback; +import org.junit.jupiter.api.extension.BeforeEachCallback; +import org.junit.jupiter.api.extension.ExtensionContext; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class MockWebService implements BeforeEachCallback, AfterEachCallback { Review comment: Thanks for the explanation. One reason I'd like to avoid adding more dependencies in itest common is to reduce the risk of conflict with the Kafka Connect runtime. It has been quite common for our tests to have problems caused by conflicts with jetty, netty and a few other libraries uses by the Kafka Connect runtime (HDFS is a notorious example of a problematic component for this). We could create a itests-http-common component and put this code there. As such it would be isolated and used only for the ones that need it. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org