Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48445

Inconsistency in usage of programMajorMinorVersion when appending jsTestOptions

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Repl 2020-07-27

      Currently, we parse the programMajorMinorVersion like so in servers.js.
      An example would be that for a binary like 'mongo-4.4', we end up parsing programMajorMinorVersion to be '404'.

      There are currently usages of the variable that expect a different parsing convention. For instance, this line here expects a binary like 'mongo-4.3' to have programMajorMinorVersion = '430'. This becomes a problem for our multiversion tests since this means we aren't getting the test coverage that we expect.

      Another example of an incorrect usage can be found here.

      It seems a little unintuitive that we parse the programMajorMinorVersion to be '404' rather than '440'. Maybe we should consider updating programMajorMinorVersion to be the following:

      programMajorMinorVersion = parseInt(major) * 100 + parseInt(minor) * 10;
      

      At the very least, we should fix the conditionals that are checking for programMajorMinorVersion incorrectly to get the intended test coverage in our multiversion tests.

            Assignee:
            xuerui.fa@mongodb.com Xuerui Fa
            Reporter:
            jason.chan@mongodb.com Jason Chan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: