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

XMLWordPrintableJSON

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

      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 (Inactive)
              Reporter:
              Vesselina Ratcheva (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: