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

MongoRunner.versionIterator.iterator.toString() should not advance the iterator

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0-rc3
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • Sprint:
      TIG 2016-10-31, TIG 2016-11-21

      Description

      MongoRunner.versionIterator is a way to express that a test should be run for multiple binVersions. It currently exposes a single method called toString() which both gets the current value of the iterator and advances it. Instead, it should have separate peek() and next() methods for reading and advancing the value respectively.

      This is important because it is easy to subtly break a test in the multiVersion suite by calling toString() on the iterator. This advances the iterator and causes MongoRunner to later launch the wrong version.

      After this is fixed, we should be able to re-enable the following tests:

      • jstests/multiVersion/2_test_launching_cluster.js
      • jstests/multiVersion/dumprestore_sharded.js

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              max.hirschhorn Max Hirschhorn
              Reporter:
              david.storch David Storch
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: