[CDRIVER-3738] Spec test runner does not track set failpoints Created: 08/Jul/20  Updated: 10/Feb/23

Status: Backlog
Project: C Driver
Component/s: tests
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: CDRIVER-2733

 Description   

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.


Generated at Wed Feb 07 21:18:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.