-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Part 1] Replace JUnit assertEquals() with Hamcrest matchers assertThat() #3500
Conversation
…iTest.java Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Codecov Report
@@ Coverage Diff @@
## main #3500 +/- ##
===========================================
+ Coverage 0 64.89% +64.89%
- Complexity 0 3640 +3640
===========================================
Files 0 284 +284
Lines 0 20619 +20619
Branches 0 3391 +3391
===========================================
+ Hits 0 13381 +13381
- Misses 0 5553 +5553
- Partials 0 1685 +1685 |
@EduardoCorazon Seems like there are lot more occurrences for |
@DarshitChanpura I will definitely get to working on them! I just made this new PR to fix some things on my end. I want to make sure that each full file replacement of assertEquals() works before working on the next. I already have two more commits to push but I'm trying to figure out why this simple replacement is failing CI tests. |
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
@EduardoCorazon The backwards compatibilty tests will pass once #3498 is merged |
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
@EduardoCorazon I've marked this as draft. Please mark it as ready for review once all changes are complete. |
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
I apologize for the delayed action on this draft. I can't believe it did not occur to me to just use regular expressions 😅 |
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
@EduardoCorazon What do you think about splitting this PR into two parts? I see that you are halfway there with about 80 files left. This would allow the changes to be manageable while reviewing. |
@DarshitChanpura that's a great idea! Let me quickly push this last change before splitting. |
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
ready to go |
@EduardoCorazon There are some outstanding file conflicts. I'll review once you address them |
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
git commit -m "merge newest main with Dev to fix conflicts" -s
Signed-off-by: Eduardo Corazon <corazoneduardo@att.net>
@DarshitChanpura After talking with Stephen it seems that separating it into parts might be causing the issues since the changes affect important files. As such, a possible solution would be to submit all changes in a single PR but this would make reviewing changes a bit tedious. However, I don't think I will have enough time to finish replacing the remaining files before the end of the program. I deeply apologize for the length of time I've taken to address this issue and for my lack of efficiency in such an approach. I've submitted a new issue with a little bit of notes and recommendations since the original issue is from 2022. If possible, I will try my best to keep contributing to the repo even after the end of the program if that's ok. Again I deeply apologize. However, if necessary, I would be more than happy to re-open and finish this PR. |
Description
This is a new PR based on: #3443
This change is a response to opensearch-project/security issue #1832 whereby it's recommended to replace Assert.assertEquals(...) with assertThat(...) for a greater degree of verbosity.
Upon collaboration, this PR will try to address and refactor files to use assertThat() as prompted in #3443 (review)
Issues Resolved
Assert.assertEquals()
withassertThat()
#1832Is this a backport? If so, please add backport PR # and/or commits #
backport 2.x
Testing
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.