zentol opened a new pull request #14923: URL: https://github.com/apache/flink/pull/14923
ping @rmetzger @tillrohrmann Based on #14921. `onEnter` logic was moved into the constructors in 7116435 . Tests were adjusted in 6bfe3a8 , including the remove of `onEnter` calls and adjusting the order of statements. Finally, 65ba2f0 disables all tests that are currently failing. Overall the main theme is `State` methods being called without `onEnter` ever having been called. This results in us testing undefined behavior in quite a few tests. (e.g., you'd call `suspend` on `Canceling` but job wasn't even canceled yet, so you're practically testing some prior state (like `Executing`)) This generally manifests in either - an NPE in the MockExecutionGraph because some methods required for the execution have not been setup - a state transitions unexpectedly being initiated and possible being completed right away For DeclarativeScheduler#transitionTo I for the time being pass a `Supplier<State>` and the corresponding class separately, instead of wrapped into a factory because it does not really seem worth the hassle. (you still have to pass a supplier to some factory, and we'd one for each state) ---------------------------------------------------------------- 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: us...@infra.apache.org