Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom test runner attribute macros #13952

Open
bruceg opened this issue Aug 11, 2022 · 0 comments
Open

Add custom test runner attribute macros #13952

bruceg opened this issue Aug 11, 2022 · 0 comments
Assignees
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.

Comments

@bruceg
Copy link
Member

bruceg commented Aug 11, 2022

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.

@bruceg bruceg added domain: tests Anything related to Vector's internal tests type: tech debt A code change that does not add user value. domain: unit tests Anything related to Vector's unit testing feature needs: approval Needs review & approval before work can begin. labels Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants