[SERVER-50460] Use a mockable time source for shard_connection_tests.cpp Created: 21/Aug/20  Updated: 12/Dec/23

Status: Backlog
Project: Core Server
Component/s: Sharding
Affects Version/s: 4.4.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Backlog - Cluster Scalability
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-34857 `sharding_legacy_api_test` is flaky d... Closed
Assigned Teams:
Cluster Scalability
Operating System: ALL
Participants:
Linked BF Score: 0

 Description   

checkNewConns utility function in shard_connection_test.cpp is creating new connections and tries to differentiate them from older ones using the creation timestamp. On certain hardware the clock resolution is not high enough and the new connections end up getting the same time, which makes the test unreliable.

An attempt to fix this was already done by kaloian.manassiev (SERVER-34857) back in 2018 for version 4.0.

Moreover this test was recently removed in master (SERVER-47426)

Either we find out that this test is obsolete and can be now removed also from 4.4 or we will need to fix it in a proper way using a mockable time source to explicitly advance the time between different connection creations.


Generated at Thu Feb 08 05:22:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.