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

localhost{1,2,3}.js tests should wait for a primary to be elected before shutting down the test

    • Fully Compatible
    • ALL
    • v4.2, v4.0
    • 15

      The replsets/localhost{1,2,3}.js tests start a replica set using ReplSetTest and then call the replSetInitiate command directly on the first node. They then immediately stop the ReplSetTest. Since they don't wait for a primary to actually complete its first election, it's possible that the work done inside stopSet ends up running alongside the election, which can cause things like collection validation to fail when we run consistency checks. We should wait for a primary to finish its election before shutting down the test to avoid these issues.

            william.schultz@mongodb.com William Schultz
            william.schultz@mongodb.com William Schultz
            0 Vote for this issue
            2 Start watching this issue