liuml07 commented on code in PR #27091:
URL: https://github.com/apache/flink/pull/27091#discussion_r2478970469
##########
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java:
##########
@@ -1691,40 +1692,17 @@ private TestingResourceManagerGateway
createAndRegisterTestingResourceManagerGat
@Test
void testJobFailureWhenGracefulTaskExecutorTermination() throws Exception {
final List<Event> jobEvents = new ArrayList<>();
- runJobFailureWhenTaskExecutorTerminatesTest(
- heartbeatServices,
- (localTaskManagerLocation, jobMasterGateway) ->
- jobMasterGateway.disconnectTaskManager(
- localTaskManagerLocation.getResourceID(),
- new FlinkException("Test disconnectTaskManager
exception.")),
- jobEvents);
- assertThat(
- jobEvents.stream()
- .filter(
- event ->
-
Events.JobStatusChangeEvent.name()
-
.equals(event.getName()))
- .map(Event::getAttributes)
- .map(x -> x.get("newJobStatus")))
- .containsExactly(
- JobStatus.RUNNING.toString(),
- JobStatus.FAILING.toString(),
- JobStatus.FAILED.toString());
+ final SchedulerType schedulerType =
+ runJobFailureWhenTaskExecutorTerminatesTest(
+ heartbeatServices,
+ (localTaskManagerLocation, jobMasterGateway) ->
+ jobMasterGateway.disconnectTaskManager(
+
localTaskManagerLocation.getResourceID(),
+ new FlinkException(
+ "Test disconnectTaskManager
exception.")),
+ jobEvents);
- assertThat(
Review Comment:
Oh, this is part of the new helper function
`assertJobStatusTransitions(schedulerType, jobEvents)` as this assertion is
also about status change and it's duplicate between the two tests, so just
reused it.
--
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]