[Bug] Saga test server teardown leaves coordinator retry tasks running
Check Ahead
- Searched existing reports for RM-channels-empty test teardown.
- Willing to fix.
Issue Description
The Saga test server fixture registers its coordinator only with the JVM shutdown hook. stopSeataServer destroys the Netty listener but leaves the coordinator's retry schedulers running. The test then destroys its RM clients, and pending retries continue into unrelated test classes with no RM channels.
Evidence
Java 17 CI job, commit 96e84e52f, raw lines 58638 onward: RetryRollbacking, RetryCommitting and parallel commit tasks report RM channels is empty after the Saga test has ended.
Expected behavior
Stop owned coordinator tasks before disconnecting RM clients and release session stores during test teardown. The intentional DemoException/compensation/retry scenarios inside Saga tests remain unchanged.
Environment
Seata 2.8.0-SNAPSHOT, Java 17, StateMachineDBTests.
Source: apache/incubator-seata