Summary
executeTestRunnerOperation in mongo/integration/unified_spec_test (the old unified spec runner) often checks fields of clientSession without checking if clientSession itself is nil. This could cause a panic if a test is malformed (unlikely) and has a session-related operation but no specified session. Would be good practice to add an assert.NotNil before each of these checks.
This method also switches back and forth between using assert calls and just returning errors to the caller (runOperation). We should just return errors so that the error chain is obvious in test debugging.
Motivation
Who is the affected end user?
Go driver devs.
How does this affect the end user?
Not at all.
How likely is it that this problem or use case will occur?
Unlikely.
If the problem does occur, what are the consequences and how severe are they?
Possible bug in test runner/.
Is this issue urgent?
No.
Is this ticket required by a downstream team?
No.
Is this ticket only for tests?
Yes.