flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-36168] [runtime] AdaptiveSchedulerTest doesn't follow the production lifecycle

Open ztison opened this issue 1 year ago • 1 comments

What is the purpose of the change

This ensures that the AdaptiveSchedulerTest follows the correct production lifecycle. Specifically, the change aims to address the issue where the executor representing the main thread is shutting down before the AdaptiveScheduler is appropriately closed. This can lead to problems with scheduled tasks when the executor is shut down prematurely. By fixing the test, the change ensures that the AdaptiveScheduler is closed correctly in all tests, preventing potential issues during shutdown and improving the reliability and accuracy of the test.

Brief change log

  • AdaptiveScheduler is closed properly after every test execution.
  • The AdaptiveScheduler instance is started in the singleThreadMainThread

Verifying this change

  • This change affects only testing classes.

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, Kubernetes/Yarn, 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

ztison avatar Aug 28 '24 12:08 ztison

CI report:

  • e5bf6b3beef6f0883ac88ad2762f33cada0caae5 Azure: SUCCESS
Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

flinkbot avatar Aug 28 '24 13:08 flinkbot

Thanks for the fix, @ztison . It looks good to me 👍

XComp avatar Aug 29 '24 15:08 XComp