make replica_set_error_codes.js more robust

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.7.2
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • Repl 2018-02-12, Repl 2018-02-26
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, replica_set_error_codes.js has asserts that a particular node must become secondary. But it is not guaranteed that this node will always win because the other secondary may also run for an election and win instead.

      Just call .getPrimary() instead, which blocks until a new primary is elected.

            Assignee:
            Pavithra Vetriselvan
            Reporter:
            Pavithra Vetriselvan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: