You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-postgres/src/test/java/org/apache/flink/cdc/connectors/postgres/source/PostgresPipelineITCaseTest.java
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -717,9 +717,13 @@ public void testDatabaseNameWithHyphenEndToEnd() throws Exception {
717
717
.collect(Collectors.toList());
718
718
assertThat(actualIds).containsExactly(1, 2, 3);
719
719
} finally {
720
-
// Cancel the job first to release the replication slot
721
-
iterator.close();
722
-
jobClient.cancel().get();
720
+
// Cancel the job with a bounded wait so cleanup always runs
721
+
try {
722
+
iterator.close();
723
+
jobClient.cancel().get();
724
+
} catch (Exceptione) {
725
+
LOG.warn("Failed to cancel job: {}", e.getMessage());
726
+
}
723
727
724
728
// Wait for the job to fully stop and release the replication slot
0 commit comments