-
Type:
Improvement
-
Resolution: Works as Designed
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Programmability
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When a unit test uses ASSERT_TASSERT_CODE (see src/mongo/unittest/tassert_guard.h, added in SERVER-131502) to check that code trips a tripwire assertion, the passing test still logs the full tassert "error block", including a scary-looking stack trace. Tests that pass should be quiet.
This ticket was created based on discussion in review of SERVER-135703.
Design consideration (from the review discussion): ASSERT_TASSERT_CODE excuses a fixed number of tasserts (typically one). Naively suppressing traces for the excused count means that if more tasserts than expected fire, only the later ones would have stack traces, and the unexpected one (which could be any of them) may be the one you needed a trace for. A possible approach: if a test-scoped guard object with a matching tassert code is in scope, check whether the tripping assertion is expected before emitting the error block; still emit full traces for any assertion that is unexpected or exceeds the excused count.
- is related to
-
SERVER-135703 FP Safety 1/5: Add relative-wait API to FailPointEnableBlock
-
- Closed
-