[GODRIVER-2117] Clean up executeTestRunnerOperation Created: 05/Aug/21 Updated: 10/Nov/23 Resolved: 08/Nov/23 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Testing |
| Affects Version/s: | None |
| Fix Version/s: | 2.0.0 |
| Type: | Bug | Priority: | Trivial - P5 |
| Reporter: | Benji Rewis (Inactive) | Assignee: | Steve Silvester |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Documentation Changes: | Not Needed |
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
| Description |
SummaryexecuteTestRunnerOperation 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. MotivationWho 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. |
| Comments |
| Comment by Githook User [ 10/Nov/23 ] |
|
Author: {'name': 'Preston Vasquez', 'email': 'prestonvasquez@icloud.com', 'username': 'prestonvasquez'}Message: Co-authored-by: Lokesh Kumar <lkumar94@gmail.com> |
| Comment by Githook User [ 08/Nov/23 ] |
|
Author: {'name': 'Steven Silvester', 'email': 'steven.silvester@ieee.org', 'username': 'blink1073'}Message: Co-authored-by: Lokesh Kumar <lkumar94@gmail.com> |