You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "funky-eyes (via GitHub)" <gi...@apache.org> on 2025/06/12 09:10:15 UTC
[PR] [WIP]try fix the ut [incubator-seata]
funky-eyes opened a new pull request, #7434:
URL: https://github.com/apache/incubator-seata/pull/7434
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Please make sure you have read and understood the contributing guidelines -->
- [ ] I have registered the PR [changes](../changes).
### Ⅰ. Describe what this PR did
### Ⅱ. Does this pull request fix one issue?
<!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->
### Ⅲ. Why don't you add test cases (unit test/integration test)?
### Ⅳ. Describe how to verify it
### Ⅴ. Special notes for reviews
--
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] [WIP]try fix the ut [incubator-seata]
Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes closed pull request #7434: [WIP]try fix the ut
URL: https://github.com/apache/incubator-seata/pull/7434
--
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] [WIP]try fix the ut [incubator-seata]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7434:
URL: https://github.com/apache/incubator-seata/pull/7434#issuecomment-2969192265
## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/7434?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 58.37%. Comparing base [(`bd717a6`)](https://app.codecov.io/gh/apache/incubator-seata/commit/bd717a6b7e77813c72d8fcf9dc43aaa9217b7517?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`ccc297a`)](https://app.codecov.io/gh/apache/incubator-seata/commit/ccc297a161cae477964b5d5502006cd680198454?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 1 commits behind head on 2.x.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 2.x #7434 +/- ##
============================================
- Coverage 58.62% 58.37% -0.25%
- Complexity 571 576 +5
============================================
Files 1269 1269
Lines 45730 45779 +49
Branches 5548 5556 +8
============================================
- Hits 26807 26725 -82
- Misses 16344 16488 +144
+ Partials 2579 2566 -13
```
| [Files with missing lines](https://app.codecov.io/gh/apache/incubator-seata/pull/7434?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...ache/seata/namingserver/manager/NamingManager.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7434?src=pr&el=tree&filepath=namingserver%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fnamingserver%2Fmanager%2FNamingManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-bmFtaW5nc2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9uYW1pbmdzZXJ2ZXIvbWFuYWdlci9OYW1pbmdNYW5hZ2VyLmphdmE=) | `69.56% <100.00%> (-1.52%)` | :arrow_down: |
| [...org/apache/seata/server/session/SessionHolder.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7434?src=pr&el=tree&filepath=server%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fserver%2Fsession%2FSessionHolder.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9zZXJ2ZXIvc2Vzc2lvbi9TZXNzaW9uSG9sZGVyLmphdmE=) | `55.12% <100.00%> (+1.92%)` | :arrow_up: |
| [...ver/spring/listener/ServerApplicationListener.java](https://app.codecov.io/gh/apache/incubator-seata/pull/7434?src=pr&el=tree&filepath=server%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fseata%2Fserver%2Fspring%2Flistener%2FServerApplicationListener.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZWF0YS9zZXJ2ZXIvc3ByaW5nL2xpc3RlbmVyL1NlcnZlckFwcGxpY2F0aW9uTGlzdGVuZXIuamF2YQ==) | `55.31% <100.00%> (-3.38%)` | :arrow_down: |
... and [43 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/7434/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/7434?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
Re: [PR] [WIP]try fix the ut [incubator-seata]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #7434:
URL: https://github.com/apache/incubator-seata/pull/7434#discussion_r2143080410
##########
server/src/main/java/org/apache/seata/server/ServerRunner.java:
##########
@@ -90,6 +92,8 @@ public void destroy() throws Exception {
disposable.destroy();
}
+ System.clearProperty(SERVER_SERVICE_PORT_CAMEL);
Review Comment:
[nitpick] Multiple components clear the SERVER_SERVICE_PORT_CAMEL property; consider centralizing this cleanup in a common utility or the BaseSpringBootTest to reduce duplication and potential inconsistencies.
##########
namingserver/src/main/java/org/apache/seata/namingserver/manager/NamingManager.java:
##########
@@ -246,6 +246,9 @@ public boolean registerInstances(List<NamingServerNode> node, String namespace,
}
public boolean registerInstance(NamingServerNode node, String namespace, String clusterName, String unitName) {
Review Comment:
[nitpick] Consider adding a comment to explain why returning false when the node is null is the desired behavior, which would help future maintainers understand the design decision.
```suggestion
public boolean registerInstance(NamingServerNode node, String namespace, String clusterName, String unitName) {
// If the node is null, it indicates an invalid input or a missing node.
// Returning false here signifies that the registration process has failed,
// allowing the caller to handle this scenario appropriately.
```
--
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