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

Use a mockable time source for shard_connection_tests.cpp

    XMLWordPrintable

Details

    • Bug
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • 4.4.0
    • None
    • Sharding
    • None
    • ALL
    • 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.

      Attachments

        Issue Links

          Activity

            People

              backlog-server-sharding-nyc Backlog - Sharding NYC
              tommaso.tocci@mongodb.com Tommaso Tocci
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: