Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2149

Read/write concern test's wtimeoutMS handling contrary to specification

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Component/s: Read and Write Concern
    • Labels:
      None
    • Needed

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: