Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
-
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
|