You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "slievrly (via GitHub)" <gi...@apache.org> on 2026/10/17 16:04:48 UTC
[PR] test: isolate Redis registry background tasks between fixtures [incubator-seata]
slievrly opened a new pull request, #8307:
URL: https://github.com/apache/incubator-seata/pull/8307
- [x] I have read the [CONTRIBUTING.md](https://github.com/apache/incubator-seata/blob/2.x/CONTRIBUTING.md) guidelines.
- [ ] I have registered the PR [changes](https://github.com/apache/incubator-seata/tree/2.x/changes).
### Ⅰ. Describe what this PR did
Fix cross-test interference from Redis registry background tasks. `RedisRegisterServiceImplTest.testClose` replaced live executors with mocks without stopping the original executors. A surviving subscription task could then obtain a later test's mocked Jedis from the static pool and cause an unexpected fourth `close()` invocation.
Terminate the unused real executors before subscriptions can be scheduled, use mock schedulers and heartbeat registration for synchronous Redis command tests, and close the service and clear its singleton after the fixture. Keep the downstream unit test's exact invocation-count assertions.
### Ⅱ. Does this pull request fix one issue?
Addresses the Java 17 test failure observed in https://github.com/apache/incubator-seata/actions/runs/39046299222/job/117435899012 .
### Ⅲ. Why don't you add test cases (unit test/integration test)?
This repairs the existing integration test fixture. Running it together with `RedisRegistryServiceImplUnitTest` exercises the cross-fixture boundary that failed in CI.
### Ⅳ. Describe how to verify it
Validated the same test change on JDK 17 against a local Redis 3.2 instance:
```sh
./mvnw -B -pl discovery/seata-discovery-redis -am \
-Dtest=RedisRegisterServiceImplTest,RedisRegistryServiceImplUnitTest \
-Dsurefire.failIfNoSpecifiedTests=false -DredisCaseEnabled=true \
-Dsurefire.runOrder=alphabetical test
```
All 11 tests passed without skips; the 9-module reactor succeeded. Maven formatting and `git diff --check` passed.
### Ⅴ. Special notes for reviews
Only test isolation changes; no production Redis behavior is changed. CI uses Redis 7.2, so remote validation remains necessary.
--
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: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] test: isolate Redis registry background tasks between fixtures [incubator-seata]
Posted by "Bughue (via GitHub)" <gi...@apache.org>.
Bughue commented on PR #8307:
URL: https://github.com/apache/incubator-seata/pull/8307#issuecomment-6247583107
LGTM
--
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: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] test: isolate Redis registry background tasks between fixtures [incubator-seata]
Posted by "Bughue (via GitHub)" <gi...@apache.org>.
Bughue merged PR #8307:
URL: https://github.com/apache/incubator-seata/pull/8307
--
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: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org
Re: [PR] test: isolate Redis registry background tasks between fixtures [incubator-seata]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #8307:
URL: https://github.com/apache/incubator-seata/pull/8307#issuecomment-6236560205
## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/8307?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 79.89%. Comparing base ([`8a31b1f`](https://app.codecov.io/gh/apache/incubator-seata/commit/8a31b1f41da325f5b498d3fa2853221620388d35?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`620b304`](https://app.codecov.io/gh/apache/incubator-seata/commit/620b304f2087ac2d382cc530d314fe9aa2b7a754?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 2.x #8307 +/- ##
============================================
- Coverage 79.91% 79.89% -0.03%
Complexity 1165 1165
============================================
Files 1400 1400
Lines 53011 53011
Branches 6349 6349
============================================
- Hits 42365 42351 -14
- Misses 7695 7710 +15
+ Partials 2951 2950 -1
```
[see 13 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/8307/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
[](https://app.codecov.io/gh/apache/incubator-seata/pull/8307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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: notifications-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org