xintongsong opened a new pull request #10852: [FLINK-15564][yarn][test] Fix YarnClusterDescriptorTest that failed to validate the original intended behavior URL: https://github.com/apache/flink/pull/10852 ## What is the purpose of the change This PR fix the `YarnClusterDescriptorTest#testFailIfTaskSlotsHigherThanMaxVcores` and `#testFailIfTaskSlotsHigherThanMaxVcores`, which should have failed long ago but was covered by other problem. The original purpose of these two test cases was to verify the validation logic against yarn max allocation vcores. These two cases should have failed when we change the validation logic to get yarn max allocation vcores from yarnClient instead of configuration, because there are no yarn cluster (neither `MiniYARNCluster`) started in these cases, thus `yarnClient#getNodeReports` will never return. The cases have not failed because another `IllegalConfigurationException` was thrown in `validateClusterSpecification`, because of memory validation failure. The memory validation failure was by design, and in order to verify the original purpose these two test cases should have been updated with reasonable memory sizes, which is unfortunately overlooked. ## Brief change log - 04ffffe5cf919ab07ddba656a68d4cd2d17c64c5: Update memory setups to uncover the problem. - I leave this as a separate commit for the convenience of code review. This should be squashed at the merging time. - 54fdafd9c9d9c4bd6df9bd9b25de461f8f5bbcec: Fix test cases by mocking the yarn max allocation vcores. ## Verifying this change This change is already covered by existing tests. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no) - The S3 file system connector: (no) ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable)
---------------------------------------------------------------- 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
