-
Notifications
You must be signed in to change notification settings - Fork 350
Development: Fix flaky LectureIntegrationTest
#11722
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
base: develop
Are you sure you want to change the base?
Conversation
Development: Fix flaky LectureIntegrationTest
The test testCreateLectureSeriesAndCorrectLectureAndChannelNames was flaky because course1.getLectures() returns a Set with non-deterministic iteration order. This caused lecture1 and lecture2 to be assigned inconsistently between test runs, leading to ~50% failure rate. Fix: Sort lectures by startDate before assigning to ensure consistent assignment of lecture1 (earlier date) and lecture2 (later date).
671f0c3 to
e72e2ef
Compare
WalkthroughTest updated to enforce deterministic ordering by sorting lecture lists by Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
End-to-End (E2E) Test Results Summary
|
||||||||||||||||||||||||
Checklist
General
Server
Motivation and Context
The test
testCreateLectureSeriesAndCorrectLectureAndChannelNamesinLectureIntegrationTestwas flaky, failing approximately 50% of the time in CI/CD with:Description
Root Cause: In
initTestCase(),course1.getLectures()returns aSet<Lecture>with non-deterministic iteration order. The test then calledgetFirst()andgetLast()on this set converted to a list, causinglecture1andlecture2to be assigned to different physical lectures between test runs.Fix: Sort lectures by
startDatebefore assigning them to ensurelecture1is always the chronologically earlier lecture andlecture2is the later one.Steps for Testing
Review Progress
Code Review
Manual Tests
Test Coverage
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.