vahmed-hamdy commented on code in PR #28: URL: https://github.com/apache/flink-connector-gcp-pubsub/pull/28#discussion_r1632243987
########## flink-connector-gcp-pubsub-e2e-tests/src/test/java/org/apache/flink/connector/gcp/pubsub/sink/util/PubsubHelper.java: ########## @@ -36,27 +40,50 @@ import com.google.pubsub.v1.ReceivedMessage; import com.google.pubsub.v1.Topic; import com.google.pubsub.v1.TopicName; +import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; +import java.time.Duration; import java.util.List; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; /** A helper class to make managing the testing topics a bit easier. */ public class PubsubHelper { private static final Logger LOG = LoggerFactory.getLogger(PubsubHelper.class); + private static final Duration SHUTDOWN_TIMEOUT = Duration.ofSeconds(5); + + private ManagedChannel channel; + private TransportChannelProvider channelProvider; private TopicAdminClient topicClient; + private SubscriptionAdminClient subscriptionAdminClient; + public PubsubHelper(String endpoint) { + channel = ManagedChannelBuilder.forTarget(endpoint).usePlaintext().build(); + channelProvider = + FixedTransportChannelProvider.create(GrpcTransportChannel.create(channel)); Review Comment: I am not following we are creating channel and channelProvider here, why do we need to check? -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org