[DRIVERS-2149] Read/write concern test's wtimeoutMS handling contrary to specification Created: 30/Sep/19  Updated: 31/Mar/22

Status: Backlog
Project: Drivers
Component/s: Read and Write Concern
Fix Version/s: None

Type: Spec Change Priority: Minor - P4
Reporter: Oleg Pudeyev (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to RUBY-1696 Add read/write concern spec runner & ... Closed
is related to DRIVERS-2064 Add a uri options spec test for w=-2 Backlog
Driver Changes: Needed

 Description   

In https://github.com/mongodb/specifications/blob/master/source/read-write-concern/tests/connection-string/write-concern.yml#L25, there is a test which requres that a wTimeoutMS of -500 is treated as an invalid uri:

 
        description: "wtimeoutMS as an invalid number"
        uri: "mongodb://localhost/?wtimeoutMS=-500"
        valid: false
        warning: ~

A search through specifications repo found only the uri options specification defining wTimeoutMS behavior (https://github.com/mongodb/specifications/blob/master/source/uri-options/uri-options.rst#list-of-specified-options), where wTimeoutMS is defined to be a "non-negative integer", however the corresponding test (https://github.com/mongodb/specifications/blob/master/source/uri-options/tests/concern-options.yml#L40) specifies that a negative value of wTimeoutMS produces a warning and a valid uri:

        description: "Too low wTimeoutMS causes a warning"
        uri: "mongodb://example.com/?wTimeoutMS=-2"
        valid: true
        warning: true
        hosts: ~
        auth: ~
        options: {}

I propose that the read/write concern test is updated to be in line with uri specification language and tests.



 Comments   
Comment by Jeremy Mikola [ 09/Dec/19 ]

This will require a review of the connection string spec to see how we're currently using warnings. I think the leads agreed that it'd be preferable to consider an out-of-range value for wTimeoutMS an actual error (i.e. URI is invalid) rather than warn, but there are still cases where warnings may be preferred (e.g. using deprecated values for boolean options, such as "yes").

oleg.pudeyev if you'd like to take this on, feel free to sync up with me to discuss/review.

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