Repository navigation
Conversation
Aias00
approved these changes
Oct 18, 2026
Aias00
left a comment
Contributor
There was a problem hiding this comment.
Approved.
Adding @PreDestroy to TaskSchedulerManager.shutdown() correctly releases the monitor scheduler and cancels in-flight tasks when the application context closes, fixing the cleanup gap described in #7701. The new TaskSchedulerManagerTest drives the full Spring lifecycle (AnnotationConfigApplicationContext close) and asserts the executor terminates.
Minor note: CI checks have not reported on this branch yet; please confirm the workflow passes before merging.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7701.
Closing the Spring application context previously left the scaling monitor's executor running because
TaskSchedulerManagercreates its scheduler internally and its existingshutdown()method was not registered as a destruction callback.Add
@PreDestroyto the existing cleanup method so context shutdown cancels registered tasks and shuts down the scheduler. Add real Spring-context regression tests covering both an active monitor task and a monitor task cancelled before context close; both assert executor shutdown and thread termination.Validation:
./mvnw -pl shenyu-admin verify(Windows wrapper, using local Maven mirror settings): 1998 tests, 0 failures, 0 errors, 1 skipped.git diff --checkpassed.b53408861failed in the unrelatedApolloDataServiceTest.testProxySelectorDataDeletedtest.Checklist:
./mvnw clean install -Dmaven.javadoc.skip=truepassed; module validation and the earlier baseline limitation are described above.