[SERVER-11820] Add server parameter to override min/maxWireVersion for driver integration testing Created: 21/Nov/13  Updated: 11/Jun/15  Resolved: 11/Jun/15

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Matt Kangas Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Participants:

 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



 Comments   
Comment by Andy Schwerin [ 11/Jun/15 ]

I'm not sure it's safe at all to lie about the wire version.

Generated at Thu Feb 08 03:26:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.