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

Fix loops conditions in `IdempotentRenameRangeDeletionsTest`

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2022-12-26
    • 135

      The loops in this disabled test are executed a random number of times that may be zero.

      Purpose of this ticket is to re-enable the test and make sure that the loops get all executed at least once.

      This test is around from ages, so someone may wonder: why did it start failing only some time ago? It turns out that SERVER-72031 added an additional call to rand() happening before the failing unit test, shifting by one the quite deterministic sequence of generated values.

      So the conclusion is: rand() is not that that random after all. Let's always use PseudoRandom that is really generating random values via XorShift128.

            Assignee:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: