-
Notifications
You must be signed in to change notification settings - Fork 276
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
Development
: Fix flaky postgres test
#8403
Conversation
WalkthroughThe changes in this update involve refactoring Java classes and methods within the Artemis project related to static code analysis. These changes focus on enhancing code clarity and efficiency by utilizing Java records, stream operations for data manipulation, and adjusting method calls for property access. Changes
Possibly related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
…ore/flaky-sca-test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes are looking good to me, using a record seems reasonable and like a better choice.
Thanks for using explicit typing instead of var
😄
src/main/java/de/tum/in/www1/artemis/service/StaticCodeAnalysisService.java
Show resolved
Hide resolved
…DueDateChange() test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, thanks for fixing this common cause of flakyness :)
Checklist
General
Motivation and Context
The test
testResetCategories
is flaky on postgess.Description
The test compared a Set against a List, leading to test failures by expecting the Set to be ordered. The test also used a bit of an hack to compare
StaticCodeAnalysisCategory
objects withStaticCodeAnalysisDefaultCategory
which I replaced by a explicit mapping. Lastly, I convertedStaticCodeAnalysisDefaultCategory
into a record.Steps for Testing
code review
Review Progress
Code Review
Summary by CodeRabbit