ymy4171 opened a new pull request, #7799: URL: https://github.com/apache/shenyu/pull/7799
Fixes #7701. Closing the Spring application context previously left the scaling monitor's executor running because `TaskSchedulerManager` creates its scheduler internally and its existing `shutdown()` method was not registered as a destruction callback. Add `@PreDestroy` to 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: - Both new regression cases failed without the callback and passed with it. - On the rebased branch: Maven Wrapper 3.6.3 / JDK 21, `./mvnw -pl shenyu-admin verify` (Windows wrapper, using local Maven mirror settings): 1998 tests, 0 failures, 0 errors, 1 skipped. - Checkstyle, Apache RAT, and `git diff --check` passed. - The full reactor was not rerun after rebasing. An earlier full-reactor baseline at `b53408861` failed in the unrelated `ApolloDataServiceTest.testProxySelectorDataDeleted` test. Checklist: - [x] I have read the contribution guidelines. - [x] I have added regression tests for the change. - [ ] Full-repository `./mvnw clean install -Dmaven.javadoc.skip=true` passed; module validation and the earlier baseline limitation are described above. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
