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

Compare server version numbers correctly in test projects

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.12.0
    • Affects Version/s: 2.10.0
    • Component/s: Testing
    • None

      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.

            Assignee:
            mikalai.mazurenka@mongodb.com Mikalai Mazurenka (Inactive)
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: