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

Add a uri options spec test for w=-2

    • Needed

      There is currently a lack of clarity for how a driver is to handle the case of negative w values in uris.

      The uri spec says that w is a "non-negative integer" or a string. However, there is no test in the uri options for a negative w.

      Per https://jira.mongodb.org/browse/SPEC-1457, uri spec similarly says that wtimeoutms is a "non-negative integer" and there is a test for wtimeoutms being a negative number, which results in a valid uri with a warning. This test conflicts with a read/write concern test for a negative wtimeoutms which expects this to be an error.

      For w, there is no uri option test but there is a read/write concern spec test requiring w=-2 to be an error. Going by this test, the handling of w is inconsistent with the handling of wtimeoutms.

      For clarity it will be helpful if the uri options tests included a test case for a negative w, or if read/write concern spec tests for w were changed to require the result be a valid uri with a warning, or if the uri options spec added a rationale stating why w=-2 is an error but wtimeoutms=-2 is a valid uri with a warning.

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

              Created:
              Updated: