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

Make `ConnectionPoolHistogramStats` tests resilient to timing issues on Windows

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Internal Code
    • None
    • Service Arch
    • ALL
    • Service Arch 2023-04-17, Service Arch 2023-05-01
    • 5

    Description

      The test injects a 60 milliseconds delay in the connection establishment path to verify that connection establishment histograms are updated properly.

      TEST_F(ConnectionPoolTest, ConnectionPoolHistogramStats) {
          using namespace unittest::match;
       
          RAIIServerParameterControllerForTest controller("featureFlagConnHealthMetrics", true);
          FailPointEnableBlock fp("injectWaitTimeForConnpoolAcquisition", BSON("sleepTimeMillis" << 60));
      ...
      

      The test was designed to not require accurate time measurements, as it accepts any value between 50 to 150 ms. However, timing inaccuracies on Windows are larger than the test currently accounts for. To fix the issue, we should either skip running the test on Windows, or make it more resilient to timing issues.

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: