[SERVER-75914] Make `ConnectionPoolHistogramStats` tests resilient to timing issues on Windows Created: 10/Apr/23  Updated: 01/May/23

Status: Open
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Service Arch
Operating System: ALL
Sprint: Service Arch 2023-04-17, Service Arch 2023-05-01
Participants:
Linked BF Score: 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.



 Comments   
Comment by Githook User [ 10/Apr/23 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-75914 Disable `scoped_db_connection_test` on Windows
Branch: master
https://github.com/mongodb/mongo/commit/c74879eb096e195215843ee2086fa616b4884ce9

Generated at Thu Feb 08 06:31:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.