Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2897

Compare server version numbers correctly in test projects

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.10.0
    • Fix Version/s: 2.12.0
    • Component/s: Testing
    • Labels:
      None

      Description

      According to the server versioning numbering scheme a version number like 4.3.0-2084-g6ef06c9 is NEWER than 4.3.0 (note: it's 2084 commits AFTER the release of 4.3.0, and is actually NOT a variant of 4.3.0 at all!).

      In our test projects we're using our SemanticVersion class to compare server version numbers, which interprets everything after the "-" as a pre-release name. And according to semantic versioning comparison rules all pre-releases of 4.3.0 are OLDER (not NEWER) than 4.3.0.

      So according to the server version number scheme:

      4.3.0-2084-g6ef06c > 4.3.0

      But according to the C# driver test code

      4.3.0-2084-g6ef06c < 4.3.0

      This could be causing us to execute or not execute certain version dependent tests incorrectly.

      We should add a new ServerVersion class that parses server version numbers and compares them correctly.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mikalai.mazurenka Mikalai Mazurenka
              Reporter:
              rstam Robert Stam
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: