You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "sharanggupta (via GitHub)" <gi...@apache.org> on 2026/10/19 21:00:27 UTC
[PR] Run the tests that have no @Test [dubbo]
sharanggupta opened a new pull request, #16527:
URL: https://github.com/apache/dubbo/pull/16527
## What is the purpose of the change?
Three test methods have no `@Test`, so they never run:
- `ParametersTest.testMap2Parameters` and `testString2Parameters`: the class extended JUnit 3's `TestCase` until the upgrade to JUnit 5 in #3149, which removed `extends TestCase` without adding `@Test`. The class has had no test since.
- `RegistryConfigTest.testPreferredWithTrueValue`: its counterpart `testPreferredWithFalseValue` right below it has `@Test`, but this one does not.
This adds `@Test` to the three methods, and removes their `public` modifier like the other test methods (#10977, #10978). They pass.
## Checklist
- [ ] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) field for the change. (No issue; this only changes tests.)
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in [dubbo samples](https://github.com/apache/dubbo-samples) project.
- [x] Make sure gitHub actions can pass. [Why the workflow is failing and how to fix it?](../CONTRIBUTING.md)
--
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@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Run the tests that have no @Test [dubbo]
Posted by "RainYuY (via GitHub)" <gi...@apache.org>.
RainYuY commented on code in PR #16527:
URL: https://github.com/apache/dubbo/pull/16527#discussion_r4320948065
##########
dubbo-common/src/test/java/org/apache/dubbo/common/utils/ParametersTest.java:
##########
@@ -16,28 +16,19 @@
*/
package org.apache.dubbo.common.utils;
-import java.util.HashMap;
import java.util.Map;
+import org.junit.jupiter.api.Test;
+
import static org.junit.jupiter.api.Assertions.assertEquals;
class ParametersTest {
final String ServiceName = "org.apache.dubbo.rpc.service.GenericService";
final String ServiceVersion = "1.0.15";
final String LoadBalance = "lcr";
- public void testMap2Parameters() {
Review Comment:
why
--
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@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Run the tests that have no @Test [dubbo]
Posted by "sharanggupta (via GitHub)" <gi...@apache.org>.
sharanggupta commented on code in PR #16527:
URL: https://github.com/apache/dubbo/pull/16527#discussion_r4327759948
##########
dubbo-common/src/test/java/org/apache/dubbo/common/utils/ParametersTest.java:
##########
@@ -16,28 +16,19 @@
*/
package org.apache.dubbo.common.utils;
-import java.util.HashMap;
import java.util.Map;
+import org.junit.jupiter.api.Test;
+
import static org.junit.jupiter.api.Assertions.assertEquals;
class ParametersTest {
final String ServiceName = "org.apache.dubbo.rpc.service.GenericService";
final String ServiceVersion = "1.0.15";
final String LoadBalance = "lcr";
- public void testMap2Parameters() {
Review Comment:
I removed it because it only reads back the values it puts into the `HashMap` itself, but you're right, that's not for this PR to decide. It's back in e021642, with `@Test` so that it runs.
--
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@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Run the tests that have no @Test [dubbo]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #16527:
URL: https://github.com/apache/dubbo/pull/16527#issuecomment-6277990730
## [Codecov](https://app.codecov.io/gh/apache/dubbo/pull/16527?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 58.59%. Comparing base ([`b73b9d1`](https://app.codecov.io/gh/apache/dubbo/commit/b73b9d131b31ed43869778abbbe799b8cd0d1d1b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`102a23d`](https://app.codecov.io/gh/apache/dubbo/commit/102a23d59323f99fff76b990f5017cf9ab141360?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 @@
## 3.3 #16527 +/- ##
============================================
- Coverage 60.89% 58.59% -2.31%
+ Complexity 11753 15 -11738
============================================
Files 1953 1952 -1
Lines 89278 89250 -28
Branches 13475 13390 -85
============================================
- Hits 54367 52292 -2075
- Misses 29329 31194 +1865
- Partials 5582 5764 +182
```
| [Flag](https://app.codecov.io/gh/apache/dubbo/pull/16527/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [integration-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/16527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/16527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [samples-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/16527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [samples-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/16527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java11](https://app.codecov.io/gh/apache/dubbo/pull/16527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java17](https://app.codecov.io/gh/apache/dubbo/pull/16527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `58.59% <ø> (-0.02%)` | :arrow_down: |
| [unit-tests-java21](https://app.codecov.io/gh/apache/dubbo/pull/16527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java25](https://app.codecov.io/gh/apache/dubbo/pull/16527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit-tests-java8](https://app.codecov.io/gh/apache/dubbo/pull/16527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/dubbo/pull/16527?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<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@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
Re: [PR] Run the tests that have no @Test [dubbo]
Posted by "RainYuY (via GitHub)" <gi...@apache.org>.
RainYuY merged PR #16527:
URL: https://github.com/apache/dubbo/pull/16527
--
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@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org