JimmyZZZ commented on code in PR #107: URL: https://github.com/apache/flink-connector-kafka/pull/107#discussion_r1670155199
########## flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/sink/KafkaWriterFaultToleranceITCase.java: ########## @@ -0,0 +1,170 @@ +/* + * 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.flink.connector.kafka.sink; + +import org.apache.flink.connector.base.DeliveryGuarantee; +import org.apache.flink.metrics.groups.SinkWriterMetricGroup; +import org.apache.flink.util.TestLoggerExtension; + +import org.apache.kafka.common.errors.TimeoutException; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInfo; +import org.junit.jupiter.api.extension.ExtendWith; + +import java.util.Properties; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThatCode; + +/** Tests for the standalone KafkaWriter in case of fault tolerance. */ +@ExtendWith(TestLoggerExtension.class) +public class KafkaWriterFaultToleranceITCase extends KafkaWriterTestBase { + private static final String INIT_KAFKA_RETRIES = "1"; + private static final String INIT_KAFKA_REQUEST_TIMEOUT_MS = "2000"; + private static final String INIT_KAFKA_MAX_BLOCK_MS = "3000"; + private static final String INIT_KAFKA_DELIVERY_TIMEOUT_MS = "4000"; Review Comment: Since we want to mock the scene of kafka unavailable, I'm worrying about the bad network of the test machine will also cause timeout too, so I keep other timeout thresholds at least 1 second here -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
