While perusing the PHPC test suite I realized that a number of session spec prose tests are not implemented. If we move forward with this ticket, we may want to consolidate these prose tests in PHPLIB like other spec tests (excluding BSON corpus, which rightfully belongs in PHPC).
----
The following prose tests are implemented:
- 1. Setting both snapshot and causalConsistency to true is not allowed is manager-startSession_error-002.phpt
- 2. Pool is LIFO is session-001.phpt
- 3. $clusterTime in commands is session-002.phpt
- 5. Session argument is for the right client is session-003.phpt
The following prose tests are not implemented but probably should be:
- 4. Explicit and implicit session arguments
- 6. No further operations can be performed using a session after endSession has been called. Note that session-endSession-001.phpt covers calling other Session methods after endSession, but we don't appear to have any tests that pass an ended session to an execute method, which is what this prose test is suggesting.
- 8. Client-side cursor that exhausts the results on the initial query immediately returns the implicit session to the pool
- 9. Client-side cursor that exhausts the results after a getMore immediately returns the implicit session to the pool
- 11. For every combination of topology and readPreference, ensure that find and getMore both send the same session id
- 12. Session pool can be cleared after forking without calling endSession is not implemented as specified, but seems related to the bug1274-00*.phpt tests for
PHPC-1274. - 13. Existing sessions are not checked into a cleared pool after forking is likewise not implemented but related to tests for
PHPC-1274.
The following prose tests are intentionally not implemented:
- 7. Authenticating as multiple users suppresses implicit sessions is intentionally not implemented since PHPC doesn't support simultaneous authentication with multiple users
- 10. No remaining sessions are checked out after each functional testhttps://github.com/mongodb/specifications/blob/master/source/sessions/tests/README.rst#no-remaining-sessions-are-checked-out-after-each-functional-test is likely not possible to implement since we don't have direct access to libmongoc's session pool. Also, this wouldn't be feasible to implement in PHPC.
- 14. Implicit sessions only allocate their server session after a successful connection checkout is not relevant since we don't have connection pools.
- 15. lsid is added inside $query when using OP_QUERY may not be relevant since the driver only supports 3.6+ servers and OP_MSG will always be used after the initial isMaster command.
- 16. Authenticating as a second user after starting a session results in a server error is not relevant as we don't support on-the-fly authentication.
- 17. Driver verifies that the session is owned by the current user is likewise not relevant since we don't support on-the-fly auth.
- related to
-
PHPLIB-919 Limit mongos Hosts for Implicit Session Prose Test
- Closed