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

resmoke.py should wait for initial sync to finish before starting any tests

    • Fully Compatible
    • ALL
    • Hide
      python buildscripts/resmoke.py --executor core_small_oplog jstests/core/geo_mapreduce2.js
      
      Show
      python buildscripts/resmoke.py --executor core_small_oplog jstests/core/geo_mapreduce2.js
    • QuInt B (11/02/15)
    • 0

      resmoke.py only verifies that the master and slave in the deployment are reachable, but does not wait for the slave to finish its initial sync. It is possible for a test to finish before the initial sync such that when the slave goes to apply the oplog entries, it causes an error. For example, renaming a collection could fail due to the target namespace already existing on the slave from the initial clone.

      class MasterSlaveFixture(interface.ReplFixture):
          ...
      
          def await_ready(self):
              self.master.await_ready()
              self.slave.await_ready()
      

      The solution is to do a replicated write of w=2 during the await_ready() function before running any tests.

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: