Add custom test runner attribute macros #13952
Labels
domain: tests
Anything related to Vector's internal tests
domain: unit tests
Anything related to Vector's unit testing feature
needs: approval
Needs review & approval before work can begin.
type: tech debt
A code change that does not add user value.
Many of our test functions start with some boilerplate for enabling various parts of the system that execute normally as part of running vector. For example, traces need to be enabled, internal metrics need to be enabled, etc. This has caused annoying test failures in some cases where some of this background processing has become required in more places (ie the recent expiring metrics change).
We should investigate setting up some custom test runner attribute macros to replace
#[test]
and#[test::tokio]
that would wrap the given function in things like trace and metrics initialization across the board. Some of that figuring out what should be set up as standard, what exceptions we need to be able to carve out, and what other helpers would be useful (such as handling component compliance tests, perhaps). Now that we have moved forward on custom configuration derive macros, we also now have some experience with setting up such macros.The text was updated successfully, but these errors were encountered: