zhuzhurk commented on issue #11148: [FLINK-16180][runtime] Replace the nullable vertexExecution in ScheduledUnit with a non-null executionVertexId URL: https://github.com/apache/flink/pull/11148#issuecomment-592390176 >> The problem is that we are unable to manipulate the state of the ExecutionVertex easily such that getPreferredLocations() returns the desired result That's true and subclassing is just to solve this kind of problems. From the references you list, I find most people also think so. It's not perfect but better than no way. And Flink already uses it for the testing of `SlotPoolImpl` with `TestingSlotPoolImpl`. Another problem of `SchedulerTestUtils` which currently uses mockito is that it only mocks what are needed by existing tests. So future tests may encounter NPE issue again when it uses these utils, e.g. `getResourceProfile()`. If you think it's better to have a minimal fix (i.e. using mockito to mock `ExecutionVertex#getID()`) first to unblock higher priority tasks, we can do it first and discuss #11230 later. WDYT?
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
