-
Notifications
You must be signed in to change notification settings - Fork 297
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 server tests
#8248
Conversation
WalkthroughThe changes across the project involve refining assertion mechanisms in specific test methods to enhance the testing framework. By adopting lambda expressions for assertions, the modifications aim to improve test readability and efficiency, streamlining the testing process without altering core functionality. Changes
Related issues
The other issues listed do not directly relate to the changes made in this PR, as they focus on integration tests, exercise import issues, and missing build plans, which are not covered by the refactoring of assertions in the 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 (
|
Development
: Fix flaky testDevelopment
: Fix flaky server tests
Not a consistent fix. Need to investigate maybe in the future. |
Checklist
General
Motivation and Context
These two flaky tests are annoying as hell. One more than the other. Succeeds, fails, succeeds, fails, succeeds, fails. Enough motivation for me :)
Description
ExerciseLifecycleServiceTest
The test is structured according to the logic of "once the values are set correctly, check if the futures are resolved." This logic is odd and apparently doesn't work very reliably. I inverted the logic to "once the expected future is resolved, check if the values are set correctly.", which works consistently.
I additionally removed the usage of the unnecessary helper method.
ParticipantScoreIntegrationTest:
For distinct combinations of
exerciseId
andparticipantId
within the record, the hash sums are the same, resulting in overrides in the map and a chance not all scores are generated. Using the hashCode method in theString
class is a different implementation and improves the situation.Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Code Review
Summary by CodeRabbit
Summary by CodeRabbit
ParticipantScoreId
record with a private method for task identification during scheduling.