dybyte commented on code in PR #9696:
URL: https://github.com/apache/seatunnel/pull/9696#discussion_r2270548616
##########
seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/JobClientJobProxyIT.java:
##########
@@ -183,4 +183,22 @@ public void testJobFailedWillThrowException() throws
IOException, InterruptedExc
.contains(
"org.apache.seatunnel.engine.server.resourcemanager.NoEnoughResourceException"));
}
+
+ @Test
+ public void testCleanupPendingJobMasterMapAfterJobFailed()
+ throws IOException, InterruptedException {
+ Container.ExecResult execResult = executeJob(server,
"/batch_slot_not_enough.conf");
+ Assertions.assertNotEquals(0, execResult.getExitCode());
+ String serverLogs = server.getLogs();
+ Assertions.assertTrue(serverLogs.contains("PendingJobMasterMap size
after cleanup: 0"));
+ }
+
+ @Test
+ public void testCleanupCheckPointCoordinatorStatus() throws IOException,
InterruptedException {
+ Container.ExecResult execResult = executeJob(server,
"/batch_slot_enough.conf");
+ Assertions.assertEquals(0, execResult.getExitCode());
+ String serverLogs = server.getLogs();
+ Assertions.assertTrue(
+ serverLogs.contains("Successfully removed checkpoint
coordinator state:"));
+ }
Review Comment:
Thank you for the suggestion! I have added test cases in
CoordinatorServiceTest accordingly. However, the memory leak issue related to
`metricsIMap` is still difficult to test. When I try to pre-lock the imap
during tests, the test fails because other logic using the imap runs before the
resource cleanup can happen.
[TaskExecutionService](https://github.com/apache/seatunnel/blob/085023ad0db1a8729ce724a14855c0077f051dfe/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/TaskExecutionService.java#L609C9-L611C93)
Should we consider skipping this particular test?
--
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]