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

replsethostnametrim.js works because of a race condition

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.1.0
    • None
    • Replication
    • None
    • ALL

    Description

      It is not testing what it's supposed to be, I think. Try applying this patch and the test fails:

      — a/jstests/replsets/replsethostnametrim.js
      +++ b/jstests/replsets/replsethostnametrim.js
      @@ -4,7 +4,7 @@ var replTest = new ReplSetTest(

      { name: 'testSet', nodes: 1 }

      );
      var nodes = replTest.startSet();
      replTest.initiate();

      -var master = replTest.nodes[0];
      +var master = replTest.getMaster();
      var config = master.getDB("local").system.replset.findOne();
      config.version++;
      var origHost = config.members[0].host;

      It is only working because reconfig returns 0 if the set isn't ready yet.

      Attachments

        Activity

          People

            scotthernandez Scott Hernandez (Inactive)
            kristina Kristina Chodorow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: