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

Fix flakiness in jstests/sharding/cursor1.js

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.10, 3.3.3
    • Component/s: Querying
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Backport Completed:
    • Sprint:
      Query 11 (03/14/16)
    • Linked BF Score:
      0

      Description

      This test is fundamentally racy. It opens a cursor, turns down the cursor timeout to 10 seconds, sleeps 6 seconds, then verifies that the cursor still exists. If it takes more than 10 seconds for the test to reach the check that the cursor still exists, mongos could have already timed-out and reaped the cursor.

      Instead, the test should turn down the cursor timeout to a small value (1 second should do), and then use assert.soon() to poll mongos until the cursor gets reaped. This is a much less flaky way to perform the intended test that mongos eventually times out cursors.

        Attachments

          Activity

            People

            Assignee:
            david.storch David Storch
            Reporter:
            david.storch David Storch
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: