Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3738

Spec test runner does not track set failpoints

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Testing
    • None
    • None
    • None
    • None
    • None
    • None

      Failpoints enabled in spec tests must be disabled after the test. This prevents leftover failpoints from interfering with future tests.

      Tests must track which failpoints are set during a test, and disable exactly those at the end of the test. For example, the instructions for the SDAM integration test operation configureFailPoint says:

      The "configureFailPoint" operation instructs the test runner to configure the given server failpoint on the "admin" database. The runner MUST disable this failpoint at the end of the test

      libmongoc currently disables a set of hard coded failpoints ("onPrimaryTransactionalWrite", "failCommand", and "failGetMoreAfterCursorCheckout") in deactivate_fail_points() in json-test.c. This currently works since those are the only failpoints used by tests. But it is susceptible to future failpoints introduced in tests not being properly disabled. That seems like a time bomb for difficult to debug test failures.

      See also: this PR conversation that motivate this ticket.

            Assignee:
            Unassigned Unassigned
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: