You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "linghengqian (via GitHub)" <gi...@apache.org> on 2023/01/28 05:56:10 UTC
[GitHub] [shardingsphere-elasticjob] linghengqian opened a new issue, #2178: Remove when entries for mockito that are not used in unit tests
linghengqian opened a new issue, #2178:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2178
## Feature Request
**For English only**, other languages will not accept.
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot make decision by current information, we will **close it**.
Please answer these questions before submitting your issue. Thanks!
### Is your feature request related to a problem?
- Yes, refer to https://github.com/oracle/graalvm-reachability-metadata/pull/208 .
### Describe the feature you would like.
- While preparing https://github.com/oracle/graalvm-reachability-metadata/pull/208 , I noticed that there are three unit tests in the master branch, and there are unused mockito `when` entries.
- These unused entries make it impossible to execute under `@org.junit.jupiter.api.extension.ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class)`, but can be executed under `@org.junit.runner.RunWith (org.mockito.junit.MockitoJUnitRunner.class)` under normal execution.
- Considering the readability of unit tests, I think it is reasonable to use `@org.junit.runner.RunWith(org.mockito.junit.MockitoJUnitRunner.StrictStubs.class)` and remove the unused when entry. These corresponding unit tests can reproduce the problem at https://github.com/linghengqian/mockito-vintage-jupiter-test .
```
org.apache.shardingsphere.elasticjob.lite.internal.failover.FailoverServiceTest#assertGetAllFailoveringItems
org.apache.shardingsphere.elasticjob.lite.internal.sharding.ExecutionServiceTest#assertGetAllRunningItems
org.apache.shardingsphere.elasticjob.lite.internal.sharding.ShardingServiceTest#assertGetCrashedShardingItemsWithEnabledServer
```
--
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@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob] TeslaCN closed issue #2178: Remove when entries for mockito that are not used in unit tests
Posted by "TeslaCN (via GitHub)" <gi...@apache.org>.
TeslaCN closed issue #2178: Remove when entries for mockito that are not used in unit tests
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2178
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere-elasticjob] linghengqian commented on issue #2178: Remove when entries for mockito that are not used in unit tests
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #2178:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2178#issuecomment-1407302657
- I'm working on this issue.
--
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@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org