Clear global state in VectorClockMongoDTestPrimary tearDown

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2020-08-10
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In VectorClockMongoDTestPrimary setup the clusterRole is set to ShardServer and the replica set member state to primary. Such global state should be cleared in the tearDown because subsequent tests can depend on it.

      For instance, the gossipOut test is currently working "by hazard" because tests based on VectorClockMongoDTest fixture are always executed before VectorClockMongoDTestPrimary ones. Changing such order - e.g. by changing fixtures alphabetical order - would cause the test to break because the result depends on clusterRole.

      PS: this ticket is probably a good reason to push for a randomization of unit tests order.

              Assignee:
              Pierlauro Sciarelli
              Reporter:
              Pierlauro Sciarelli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: