elastic / apm-queue

Abstraction layer over Kafka / GCP PubSub Lite to produce and consume records
Apache License 2.0
6 stars 15 forks source link

test: broken `TestProducerMetrics` #483

Open kyungeunni opened 3 months ago

kyungeunni commented 3 months ago

While working on #478, I noticed that the test case TestProducerMetrics isn't validating anything, even specifying non-existing metric name as an expected metric, it passes.

For example, This test case passes: https://github.com/elastic/apm-queue/blob/89aef429e73b767c9c58d3e3537d27c2eeefaafc/kafka/metrics_test.go#L207-L209

even though the expected unit is "Byte": https://github.com/elastic/apm-queue/blob/89aef429e73b767c9c58d3e3537d27c2eeefaafc/kafka/metrics.go#L224-L226

Tried to fix this while working the PR, but fix to the tests cascaded other tests to fail so it seems like it requires dedicated time to fix.