Skip to content

Refactor MetricsHook unit tests to use new MetricCollector pattern #514

@askpt

Description

@askpt

Description

The new unit test pattern introduced in #512 (using the MetricCollector approach for MetricsHook unit tests) is clearer and easier to test. For consistency, this work should be replicated in other unit tests.

Acceptance Criteria:

  • Refactor existing MetricsHook-related unit tests to use the new MetricCollector approach, following the pattern introduced in feat: Add Metric Hook Custom Attributes #512.
  • Ensure all refactored tests retain their previous coverage and intent.
  • Do not change the logic of the tests, only the test structure and pattern.
  • Add/update documentation if necessary.

References:


Comment context:

This seems to be using a different pattern. I think it makes more sense, when you compare with the previous implementation. If we merge this as it is, I would advice to replicate this pattern to the other unit tests.

Originally posted by @askpt in #512 (comment)

Metadata

Metadata

Assignees

Labels

type: testImprovement or additions to test suite

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions