-
Notifications
You must be signed in to change notification settings - Fork 470
Add test for startSession with lsid
#5333
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: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5333 +/- ##
==========================================
- Coverage 42.79% 42.78% -0.02%
==========================================
Files 172 172
Lines 18427 18427
==========================================
- Hits 7886 7884 -2
- Misses 10111 10113 +2
Partials 430 430 see 4 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…nto start-sessions-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.
Pull Request Overview
This PR adds a test to verify that calling startSession with an lsid parameter creates two distinct sessions in the system. The test validates the ambiguous logic behavior where both the provided lsid and a new session ID are created and stored.
- Adds
TestStartSessionWithLSIDCreatesTwoSessionsfunction to test session creation behavior - Integrates with
$listLocalSessionsaggregation to verify both session IDs exist - Uses wire protocol directly for
startSessionand driver for session listing
Comments suppressed due to low confidence (2)
integration/session/startsession_test.go:559
- [nitpick] The variable name
containsLsidFis unclear. Consider renaming tocontainsLsidorlsidFoundfor better readability.
containsLsidF := slices.ContainsFunc(sessionIDs, func(id wirebson.Binary) bool { return wirebson.Equal(lsid, id) })
integration/session/startsession_test.go:562
- [nitpick] The variable name
containsSessionIDFis unclear. Consider renaming tocontainsSessionIDorsessionIDFoundfor better readability.
containsSessionIDF := slices.ContainsFunc(sessionIDs, func(id wirebson.Binary) bool { return wirebson.Equal(sessionID, id) })
# Conflicts: # integration/session/startsession_test.go
Description
Add test ambiguous logic for
startSessioncreating two sessions. Unfortunately this test only runs on proxy for now.Closes #5309.
Readiness checklist
task all, and it passed.@FerretDB/core), Milestone (Next), Labels, Project and project's Sprint fields.