-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Testing
-
None
-
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.