github-actions[bot] commented on code in PR #64741:
URL: https://github.com/apache/doris/pull/64741#discussion_r3472422445


##########
fs_brokers/cdc_client/src/test/java/org/apache/doris/cdcclient/itcase/MySqlStartupGtidOffsetITCase.java:
##########
@@ -0,0 +1,165 @@
+// 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.doris.cdcclient.itcase;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import org.apache.doris.cdcclient.common.Env;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.testcontainers.containers.MySQLContainer;
+import org.testcontainers.junit.jupiter.Container;
+import org.testcontainers.junit.jupiter.Testcontainers;
+import org.testcontainers.utility.DockerImageName;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.time.Duration;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * GTID counterpart of {@link MySqlStartupSpecificOffsetITCase}: given a 
recorded GTID set as the
+ * specific-offset (no binlog file/position), the job must replay from exactly 
that point forward —
+ * proving the GTID-only resume offset is honored end-to-end, not just 
preserved in config.
+ */
+@Testcontainers
+class MySqlStartupGtidOffsetITCase {
+
+    private static final String ROOT_USER = "root";
+    private static final String ROOT_PASSWORD = "123456";
+    private static final ObjectMapper MAPPER = new ObjectMapper();
+    private static final AtomicLong JOB_ID_SEQ = new AtomicLong(980_000);

Review Comment:
   This reuses the same job id range as `MySqlCharsetITCase` (`JOB_ID_SEQ = new 
AtomicLong(980_000)`). The CDC test harness relies on job ids being unique 
because `Env` is a process-wide singleton keyed only by `jobId`; if these IT 
classes ever overlap in a parallel/forked run, both first tests create 
`980001`, so one class can reuse the other's reader/config or 
`Env.close(jobId)` can tear down the other test's context. Please move this new 
case to an unused seed range so the per-test database name and the reader cache 
stay isolated.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to