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

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

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.0-rc3
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Minor Change
    • TIG 2016-10-31, TIG 2016-11-21

      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

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: