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

Add methods to globally disable and re-enable hang analyzer in tests

    • Fully Compatible
    • STM 2020-01-23, STM 2020-02-10
    • 1

      While the passing the 'runHangAnalyzer=false' argument to assert.soon works well in mosts tests, there are a few replica set tests that expect throws of assert.soon calls located several functions deep into the ReplSetTest fixture.

      In such cases, it would be cleaner if we had global enable/disable methods for the hang analyzer and let tests wrap an enable/disable pair around the places where they expect assert.soon to fail, to be used as such:

      ...
      hangAnalyzer.disable();
      
      // This ultimately triggers an assert.soon failure.
      timeoutExpectedByTest();
      
      hangAnalyzer.enable();
      ...
      

            Assignee:
            robert.guo@mongodb.com Robert Guo (Inactive)
            Reporter:
            vesselina.ratcheva@mongodb.com Vesselina Ratcheva (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: