Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2117

Clean up executeTestRunnerOperation

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 2.0.0
    • Affects Version/s: None
    • Component/s: Testing
    • None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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.

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: