In jstests using failPoints, use waitForFailPoint command instead of checking logs

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • QE 2022-10-17
    • 44
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Based on BF-26526.

      For example this test: https://github.com/mongodb/mongo/blob/a7cda0d9cf32b7074b4c9a2efe6e6590b4dab564/jstests/core/txns/speculative_snapshot_includes_all_writes.js
      1. Setups fail point.
      2. Starts parallel shell to hit the fail point.
      3. In main shell uses checkLog to find line about hitting the fail point.
      4. Checks stuff

      It can fail when between steps 2 and 3 too many events will happen so message about hitting the fail point will be pushed out of RAM log cache.

      To avoid it, we need to replace checkLog with waitForFailPoint command, created specifically for this case: https://github.com/mongodb/mongo/wiki/The-%22failCommand%22-fail-point

      Also, we should check other tests that may contain similar problems.

            Assignee:
            Ivan Fefer
            Reporter:
            Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: