You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "Taher-Ghaleb (via GitHub)" <gi...@apache.org> on 2023/08/24 06:46:21 UTC

[GitHub] [hive] Taher-Ghaleb commented on pull request #4625: Refactor assertFalse(equals()) using assertNotEquals & @Test(excepted) using assertThrows

Taher-Ghaleb commented on PR #4625:
URL: https://github.com/apache/hive/pull/4625#issuecomment-1691097946

   Thanks, @ayushtkn. I have submitted a form for account creation and will create a Jira report once the account is approved.
   
   I would also like to get your input on these changes, please. In your opinion, why is `assertFalse(equals())` is still used instead of `assertNotEquals`, or even `assertTrue(equals())` instead of `assertEquals`? Typically, `assertNotEquals` improves the readability of a test case and makes equality checks more explicit and intuitive, unlike `assertFalse` or `assertTrue` combined with `equals`, which indirectly checks if two objects are not equal. Also, `assertNotEquals` typically provides more informative failure messages, as it can include details about the expected and actual values if the assertion fails, making it easier to diagnose and fix the 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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org