You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/06/24 13:42:55 UTC

[GitHub] [dubbo] Codegass opened a new issue, #10212: Assertion Missing in the Test Case `testClear`

Codegass opened a new issue, #10212:
URL: https://github.com/apache/dubbo/issues/10212

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [X] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ## Ask your question here
   
   Hi Dubbo Community,
   
   I noticed that [testClear](https://github.com/apache/dubbo/blob/d41a0448c70ac11e1d3df4b80ba9fd00829097a6/dubbo-common/src/test/java/org/apache/dubbo/common/utils/DubboAppenderTest.java#L75) has commented all the assertions. In my understanding, `testClear` is testing `DubboAppender.clear()` function to make sure the DubboAppender is cleared successfully. But right now all the assertions are commented, not checking any of the running results. I am just wondering what is the condition to pass the test case now. Should we just restore the commented Assertions in the case? 
   
   
   In addition, I propose to replace the first commented `assertThat()` with `assumeThat()`[^1], since it is checking the precondition of the test. Assume functions from JUnit4&5 can skip the test if the precondition failed, which can help the developer to identify the bug sources. if you think this makes sense, I would be more than happy to try the refactoring and submit a PR.
   
   [^1]: Doc for Assume in JUnit please check [here](https://junit.org/junit5/docs/5.0.0/api/org/junit/jupiter/api/Assumptions.html).


-- 
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.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


[GitHub] [dubbo] wangchengming666 commented on issue #10212: Assertion Missing in the Test Case `testClear`

Posted by GitBox <gi...@apache.org>.
wangchengming666 commented on issue #10212:
URL: https://github.com/apache/dubbo/issues/10212#issuecomment-1175142653

   solved by https://github.com/apache/dubbo/pull/10250, so close.


-- 
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


[GitHub] [dubbo] wangchengming666 closed issue #10212: Assertion Missing in the Test Case `testClear`

Posted by GitBox <gi...@apache.org>.
wangchengming666 closed issue #10212: Assertion Missing in the Test Case `testClear`
URL: https://github.com/apache/dubbo/issues/10212


-- 
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