Copilot commented on code in PR #9359:
URL: https://github.com/apache/seatunnel/pull/9359#discussion_r2106457739
##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-kafka-e2e/src/test/java/org/apache/seatunnel/e2e/connector/kafka/KafkaIT.java:
##########
@@ -143,6 +145,26 @@ public void startUp() throws Exception {
.atMost(180, TimeUnit.SECONDS)
.untilAsserted(this::initKafkaProducer);
+ Properties adminProps = new Properties();
+ adminProps.put(
+ AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG,
kafkaContainer.getBootstrapServers());
+ // Set the retention time to -1 to read data older than 7 days.
+ try (AdminClient adminClient = AdminClient.create(adminProps)) {
+ NewTopic testTopicSource = new NewTopic("test_topic_source", 1,
(short) 1);
+ testTopicSource.configs(Collections.singletonMap("retention.ms",
"-1"));
+
+ NewTopic testTopicNativeSource = new
NewTopic("test_topic_native_source", 1, (short) 1);
+
testTopicNativeSource.configs(Collections.singletonMap("retention.ms", "-1"));
+
+ NewTopic testTopicSourceWithTimestamp =
+ new NewTopic("test_topic_source_timestamp", 1, (short) 1);
+
testTopicSourceWithTimestamp.configs(Collections.singletonMap("retention.ms",
"-1"));
+
+
adminClient.createTopics(Collections.singletonList(testTopicSource));
+
adminClient.createTopics(Collections.singletonList(testTopicNativeSource));
+
adminClient.createTopics(Collections.singletonList(testTopicSourceWithTimestamp));
Review Comment:
[nitpick] Consider consolidating the creation of all topics into a single
createTopics call (e.g., passing a list of topics) to reduce redundancy and
simplify the code.
```suggestion
List<NewTopic> topics = Arrays.asList(testTopicSource,
testTopicNativeSource, testTopicSourceWithTimestamp);
adminClient.createTopics(topics);
```
##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-kafka-e2e/src/test/resources/kafka/kafkasource_format_error_handle_way_skip_to_console.conf:
##########
@@ -90,6 +90,13 @@ sink {
]
}
]
+ row_rules = [
+ {
+ rule_type = MAX_ROW
Review Comment:
[nitpick] Consider adding an inline comment to explain the usage of the
MAX_ROW rule with a rule_value of 0 to clarify its purpose in this error
handling test configuration.
--
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]