Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11820

Add server parameter to override min/maxWireVersion for driver integration testing

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Networking
    • None
    • Fully Compatible

    Description

      Suggestion to facilitate testing of DRIVERS-114:

      As of version 2.5.2 (SERVER-10529), isMaster returns values for "minWireVersion" and "maxWireVersion". Drivers are now required to check these values when present in the isMaster response, and abort connections to servers if min/maxWireVersion are not within an expected range of values (currently 0-2).

      How shall we test that drivers implement this properly?

      We need an integration test to verify that drivers correctly reject connections, and driver needs to talk to a server with min/maxWireVersion in an incorrect range. But we cannot use the normal server for this test...

      We could maintain a fork of the server codebase with hacked min/maxWireVersion values. But this will be hard to maintain.

      Why don't we add a (hidden) server startup parameter so, for integration tests, we could alter the server's min/maxWireVersion?

      Proposed parameter:

      --setParameter overrideMinMaxWireVersion=4,5

      Attachments

        Activity

          People

            schwerin@mongodb.com Andy Schwerin
            matt.kangas Matt Kangas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: